google-cloud-os_config-v1 0.1.2 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0821f48d87aed1732e0609b31f64d26315e8658d2891afaedc479ede4de879fe'
4
- data.tar.gz: dcce845958e2cf745c4214ff40c40de286f489f9e86cada8344ff264eae53f7b
3
+ metadata.gz: 0eee9ced0dbc80c5ac10af95de0f38b4d8e97c0c8ed5e8edf0fb2a5e36c4fdde
4
+ data.tar.gz: '082b041798167534f31427514974c2e8f0a405032382aaa8d781786f69b47195'
5
5
  SHA512:
6
- metadata.gz: 3f2496f4718830b2cd9aaa3d2af8f885ad74b766a3e918fe51e4bbfebed79e3b8198645acca5640d3ae76385e56530ad888eb563ec75361c62372d724bf6b944
7
- data.tar.gz: 4f529687429691f59005ac9dbc26dc0978f011003a64452d50e27b384f320e546bb34058c8f55434233e5513b24699e8aaec4b1cfee176b314ec01434b2fd57a
6
+ metadata.gz: 405488ff9f31cb46f97891793d98fd9a35e249cb052e891bbaf9ceb8ad397482ee5a3cdea1172ddfa0c829a1a3c17d1f4b1f3c15bae4fec3bb763afa4fa67ad4
7
+ data.tar.gz: 718099900050a7560fdc998757816583972cc7f3c258e1572830e72b22294d06da1424f5dd57ac314a020b22f214aab6092f9acc72a79146cce452a41daac263
data/README.md CHANGED
@@ -6,6 +6,12 @@ Cloud OS Config provides OS management tools that can be used for patch manageme
6
6
 
7
7
  https://github.com/googleapis/google-cloud-ruby
8
8
 
9
+ This gem is a _versioned_ client. It provides basic client classes for a
10
+ specific version of the Cloud OS Config V1 API. Most users should consider using
11
+ the main client gem,
12
+ [google-cloud-os_config](https://rubygems.org/gems/google-cloud-os_config).
13
+ See the section below titled *Which client should I use?* for more information.
14
+
9
15
  ## Installation
10
16
 
11
17
  ```
@@ -73,3 +79,61 @@ in security maintenance, and not end of life. Currently, this means Ruby 2.4
73
79
  and later. Older versions of Ruby _may_ still work, but are unsupported and not
74
80
  recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
75
81
  about the Ruby support schedule.
82
+
83
+ ## Which client should I use?
84
+
85
+ Most modern Ruby client libraries for Google APIs come in two flavors: the main
86
+ client library with a name such as `google-cloud-os_config`,
87
+ and lower-level _versioned_ client libraries with names such as
88
+ `google-cloud-os_config-v1`.
89
+ _In most cases, you should install the main client._
90
+
91
+ ### What's the difference between the main client and a versioned client?
92
+
93
+ A _versioned client_ provides a basic set of data types and client classes for
94
+ a _single version_ of a specific service. (That is, for a service with multiple
95
+ versions, there might be a separate versioned client for each service version.)
96
+ Most versioned clients are written and maintained by a code generator.
97
+
98
+ The _main client_ is designed to provide you with the _recommended_ client
99
+ interfaces for the service. There will be only one main client for any given
100
+ service, even a service with multiple versions. The main client includes
101
+ factory methods for constructing the client objects we recommend for most
102
+ users. In some cases, those will be classes provided by an underlying versioned
103
+ client; in other cases, they will be handwritten higher-level client objects
104
+ with additional capabilities, convenience methods, or best practices built in.
105
+ Generally, the main client will default to a recommended service version,
106
+ although in some cases you can override this if you need to talk to a specific
107
+ service version.
108
+
109
+ ### Why would I want to use the main client?
110
+
111
+ We recommend that most users install the main client gem for a service. You can
112
+ identify this gem as the one _without_ a version in its name, e.g.
113
+ `google-cloud-os_config`.
114
+ The main client is recommended because it will embody the best practices for
115
+ accessing the service, and may also provide more convenient interfaces or
116
+ tighter integration into frameworks and third-party libraries. In addition, the
117
+ documentation and samples published by Google will generally demonstrate use of
118
+ the main client.
119
+
120
+ ### Why would I want to use a versioned client?
121
+
122
+ You can use a versioned client if you are content with a possibly lower-level
123
+ class interface, you explicitly want to avoid features provided by the main
124
+ client, or you want to access a specific service version not be covered by the
125
+ main client. You can identify versioned client gems because the service version
126
+ is part of the name, e.g. `google-cloud-os_config-v1`.
127
+
128
+ ### What about the google-apis-<name> clients?
129
+
130
+ Client library gems with names that begin with `google-apis-` are based on an
131
+ older code generation technology. They talk to a REST/JSON backend (whereas
132
+ most modern clients talk to a [gRPC](https://grpc.io/) backend) and they may
133
+ not offer the same performance, features, and ease of use provided by more
134
+ modern clients.
135
+
136
+ The `google-apis-` clients have wide coverage across Google services, so you
137
+ might need to use one if there is no modern client available for the service.
138
+ However, if a modern client is available, we generally recommend it over the
139
+ older `google-apis-` clients.
@@ -33,3 +33,6 @@ module Google
33
33
  end
34
34
  end
35
35
  end
36
+
37
+ helper_path = ::File.join __dir__, "v1", "_helpers.rb"
38
+ require "google/cloud/os_config/v1/_helpers" if ::File.file? helper_path
@@ -73,7 +73,7 @@ module Google
73
73
  initial_delay: 1.0,
74
74
  max_delay: 60.0,
75
75
  multiplier: 1.3,
76
- retry_codes: ["UNAVAILABLE"]
76
+ retry_codes: [14]
77
77
  }
78
78
 
79
79
  default_config
@@ -137,7 +137,13 @@ module Google
137
137
 
138
138
  # Create credentials
139
139
  credentials = @config.credentials
140
- credentials ||= Credentials.default scope: @config.scope
140
+ # Use self-signed JWT if the scope and endpoint are unchanged from default,
141
+ # but only if the default endpoint does not have a region prefix.
142
+ enable_self_signed_jwt = @config.scope == Client.configure.scope &&
143
+ @config.endpoint == Client.configure.endpoint &&
144
+ !@config.endpoint.split(".").first.include?("-")
145
+ credentials ||= Credentials.default scope: @config.scope,
146
+ enable_self_signed_jwt: enable_self_signed_jwt
141
147
  if credentials.is_a?(String) || credentials.is_a?(Hash)
142
148
  credentials = Credentials.new credentials, scope: @config.scope
143
149
  end
@@ -168,7 +174,7 @@ module Google
168
174
  # @param options [::Gapic::CallOptions, ::Hash]
169
175
  # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
170
176
  #
171
- # @overload execute_patch_job(parent: nil, description: nil, instance_filter: nil, patch_config: nil, duration: nil, dry_run: nil, display_name: nil)
177
+ # @overload execute_patch_job(parent: nil, description: nil, instance_filter: nil, patch_config: nil, duration: nil, dry_run: nil, display_name: nil, rollout: nil)
172
178
  # Pass arguments to `execute_patch_job` via keyword arguments. Note that at
173
179
  # least one keyword argument is required. To specify no parameters, or to keep all
174
180
  # the default parameter values, pass an empty Hash as a request object (see above).
@@ -179,8 +185,8 @@ module Google
179
185
  # Description of the patch job. Length of the description is limited
180
186
  # to 1024 characters.
181
187
  # @param instance_filter [::Google::Cloud::OsConfig::V1::PatchInstanceFilter, ::Hash]
182
- # Required. Instances to patch, either explicitly or filtered by some criteria such
183
- # as zone or labels.
188
+ # Required. Instances to patch, either explicitly or filtered by some
189
+ # criteria such as zone or labels.
184
190
  # @param patch_config [::Google::Cloud::OsConfig::V1::PatchConfig, ::Hash]
185
191
  # Patch configuration being applied. If omitted, instances are
186
192
  # patched using the default configurations.
@@ -192,6 +198,8 @@ module Google
192
198
  # will do nothing.
193
199
  # @param display_name [::String]
194
200
  # Display name for this patch job. This does not have to be unique.
201
+ # @param rollout [::Google::Cloud::OsConfig::V1::PatchRollout, ::Hash]
202
+ # Rollout strategy of the patch job.
195
203
  #
196
204
  # @yield [response, operation] Access the result along with the RPC operation
197
205
  # @yieldparam response [::Google::Cloud::OsConfig::V1::PatchJob]
@@ -467,7 +475,8 @@ module Google
467
475
  # the default parameter values, pass an empty Hash as a request object (see above).
468
476
  #
469
477
  # @param parent [::String]
470
- # Required. The parent for the instances are in the form of `projects/*/patchJobs/*`.
478
+ # Required. The parent for the instances are in the form of
479
+ # `projects/*/patchJobs/*`.
471
480
  # @param page_size [::Integer]
472
481
  # The maximum number of instance details records to return. Default is 100.
473
482
  # @param page_token [::String]
@@ -543,10 +552,11 @@ module Google
543
552
  # the default parameter values, pass an empty Hash as a request object (see above).
544
553
  #
545
554
  # @param parent [::String]
546
- # Required. The project to apply this patch deployment to in the form `projects/*`.
555
+ # Required. The project to apply this patch deployment to in the form
556
+ # `projects/*`.
547
557
  # @param patch_deployment_id [::String]
548
- # Required. A name for the patch deployment in the project. When creating a name
549
- # the following rules apply:
558
+ # Required. A name for the patch deployment in the project. When creating a
559
+ # name the following rules apply:
550
560
  # * Must contain only lowercase letters, numbers, and hyphens.
551
561
  # * Must start with a letter.
552
562
  # * Must be between 1-63 characters.
@@ -688,10 +698,12 @@ module Google
688
698
  # @param parent [::String]
689
699
  # Required. The resource name of the parent in the form `projects/*`.
690
700
  # @param page_size [::Integer]
691
- # Optional. The maximum number of patch deployments to return. Default is 100.
701
+ # Optional. The maximum number of patch deployments to return. Default is
702
+ # 100.
692
703
  # @param page_token [::String]
693
- # Optional. A pagination token returned from a previous call to ListPatchDeployments
694
- # that indicates where this listing should continue from.
704
+ # Optional. A pagination token returned from a previous call to
705
+ # ListPatchDeployments that indicates where this listing should continue
706
+ # from.
695
707
  #
696
708
  # @yield [response, operation] Access the result along with the RPC operation
697
709
  # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1::PatchDeployment>]
@@ -891,7 +903,7 @@ module Google
891
903
 
892
904
  config_attr :endpoint, "osconfig.googleapis.com", ::String
893
905
  config_attr :credentials, nil do |value|
894
- allowed = [::String, ::Hash, ::Proc, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
906
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
895
907
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
896
908
  allowed.any? { |klass| klass === value }
897
909
  end
@@ -931,7 +943,7 @@ module Google
931
943
  # Each configuration object is of type `Gapic::Config::Method` and includes
932
944
  # the following configuration fields:
933
945
  #
934
- # * `timeout` (*type:* `Numeric`) - The call timeout in milliseconds
946
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
935
947
  # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
936
948
  # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
937
949
  # include the following keys:
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module OsConfig
23
23
  module V1
24
- VERSION = "0.1.2"
24
+ VERSION = "0.3.0"
25
25
  end
26
26
  end
27
27
  end
@@ -0,0 +1,108 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/osconfig/v1/inventory.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/timestamp_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("google/cloud/osconfig/v1/inventory.proto", :syntax => :proto3) do
9
+ add_message "google.cloud.osconfig.v1.Inventory" do
10
+ optional :os_info, :message, 1, "google.cloud.osconfig.v1.Inventory.OsInfo"
11
+ map :items, :string, :message, 2, "google.cloud.osconfig.v1.Inventory.Item"
12
+ end
13
+ add_message "google.cloud.osconfig.v1.Inventory.OsInfo" do
14
+ optional :hostname, :string, 9
15
+ optional :long_name, :string, 2
16
+ optional :short_name, :string, 3
17
+ optional :version, :string, 4
18
+ optional :architecture, :string, 5
19
+ optional :kernel_version, :string, 6
20
+ optional :kernel_release, :string, 7
21
+ optional :osconfig_agent_version, :string, 8
22
+ end
23
+ add_message "google.cloud.osconfig.v1.Inventory.Item" do
24
+ optional :id, :string, 1
25
+ optional :origin_type, :enum, 2, "google.cloud.osconfig.v1.Inventory.Item.OriginType"
26
+ optional :create_time, :message, 8, "google.protobuf.Timestamp"
27
+ optional :update_time, :message, 9, "google.protobuf.Timestamp"
28
+ optional :type, :enum, 5, "google.cloud.osconfig.v1.Inventory.Item.Type"
29
+ oneof :details do
30
+ optional :installed_package, :message, 6, "google.cloud.osconfig.v1.Inventory.SoftwarePackage"
31
+ optional :available_package, :message, 7, "google.cloud.osconfig.v1.Inventory.SoftwarePackage"
32
+ end
33
+ end
34
+ add_enum "google.cloud.osconfig.v1.Inventory.Item.OriginType" do
35
+ value :ORIGIN_TYPE_UNSPECIFIED, 0
36
+ value :INVENTORY_REPORT, 1
37
+ end
38
+ add_enum "google.cloud.osconfig.v1.Inventory.Item.Type" do
39
+ value :TYPE_UNSPECIFIED, 0
40
+ value :INSTALLED_PACKAGE, 1
41
+ value :AVAILABLE_PACKAGE, 2
42
+ end
43
+ add_message "google.cloud.osconfig.v1.Inventory.SoftwarePackage" do
44
+ oneof :details do
45
+ optional :yum_package, :message, 1, "google.cloud.osconfig.v1.Inventory.VersionedPackage"
46
+ optional :apt_package, :message, 2, "google.cloud.osconfig.v1.Inventory.VersionedPackage"
47
+ optional :zypper_package, :message, 3, "google.cloud.osconfig.v1.Inventory.VersionedPackage"
48
+ optional :googet_package, :message, 4, "google.cloud.osconfig.v1.Inventory.VersionedPackage"
49
+ optional :zypper_patch, :message, 5, "google.cloud.osconfig.v1.Inventory.ZypperPatch"
50
+ optional :wua_package, :message, 6, "google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage"
51
+ optional :qfe_package, :message, 7, "google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage"
52
+ optional :cos_package, :message, 8, "google.cloud.osconfig.v1.Inventory.VersionedPackage"
53
+ end
54
+ end
55
+ add_message "google.cloud.osconfig.v1.Inventory.VersionedPackage" do
56
+ optional :package_name, :string, 4
57
+ optional :architecture, :string, 2
58
+ optional :version, :string, 3
59
+ end
60
+ add_message "google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage" do
61
+ optional :title, :string, 1
62
+ optional :description, :string, 2
63
+ repeated :categories, :message, 3, "google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory"
64
+ repeated :kb_article_ids, :string, 4
65
+ optional :support_url, :string, 11
66
+ repeated :more_info_urls, :string, 5
67
+ optional :update_id, :string, 6
68
+ optional :revision_number, :int32, 7
69
+ optional :last_deployment_change_time, :message, 10, "google.protobuf.Timestamp"
70
+ end
71
+ add_message "google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory" do
72
+ optional :id, :string, 1
73
+ optional :name, :string, 2
74
+ end
75
+ add_message "google.cloud.osconfig.v1.Inventory.ZypperPatch" do
76
+ optional :patch_name, :string, 5
77
+ optional :category, :string, 2
78
+ optional :severity, :string, 3
79
+ optional :summary, :string, 4
80
+ end
81
+ add_message "google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage" do
82
+ optional :caption, :string, 1
83
+ optional :description, :string, 2
84
+ optional :hot_fix_id, :string, 3
85
+ optional :install_time, :message, 5, "google.protobuf.Timestamp"
86
+ end
87
+ end
88
+ end
89
+
90
+ module Google
91
+ module Cloud
92
+ module OsConfig
93
+ module V1
94
+ Inventory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory").msgclass
95
+ Inventory::OsInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.OsInfo").msgclass
96
+ Inventory::Item = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.Item").msgclass
97
+ Inventory::Item::OriginType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.Item.OriginType").enummodule
98
+ Inventory::Item::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.Item.Type").enummodule
99
+ Inventory::SoftwarePackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.SoftwarePackage").msgclass
100
+ Inventory::VersionedPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.VersionedPackage").msgclass
101
+ Inventory::WindowsUpdatePackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage").msgclass
102
+ Inventory::WindowsUpdatePackage::WindowsUpdateCategory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.WindowsUpdatePackage.WindowsUpdateCategory").msgclass
103
+ Inventory::ZypperPatch = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.ZypperPatch").msgclass
104
+ Inventory::WindowsQuickFixEngineeringPackage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.Inventory.WindowsQuickFixEngineeringPackage").msgclass
105
+ end
106
+ end
107
+ end
108
+ end
@@ -0,0 +1,25 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/cloud/osconfig/v1/osconfig_common.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("google/cloud/osconfig/v1/osconfig_common.proto", :syntax => :proto3) do
8
+ add_message "google.cloud.osconfig.v1.FixedOrPercent" do
9
+ oneof :mode do
10
+ optional :fixed, :int32, 1
11
+ optional :percent, :int32, 2
12
+ end
13
+ end
14
+ end
15
+ end
16
+
17
+ module Google
18
+ module Cloud
19
+ module OsConfig
20
+ module V1
21
+ FixedOrPercent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.FixedOrPercent").msgclass
22
+ end
23
+ end
24
+ end
25
+ end
@@ -37,25 +37,25 @@ module Google
37
37
  self.service_name = 'google.cloud.osconfig.v1.OsConfigService'
38
38
 
39
39
  # Patch VM instances by creating and running a patch job.
40
- rpc :ExecutePatchJob, Google::Cloud::OsConfig::V1::ExecutePatchJobRequest, Google::Cloud::OsConfig::V1::PatchJob
40
+ rpc :ExecutePatchJob, ::Google::Cloud::OsConfig::V1::ExecutePatchJobRequest, ::Google::Cloud::OsConfig::V1::PatchJob
41
41
  # Get the patch job. This can be used to track the progress of an
42
42
  # ongoing patch job or review the details of completed jobs.
43
- rpc :GetPatchJob, Google::Cloud::OsConfig::V1::GetPatchJobRequest, Google::Cloud::OsConfig::V1::PatchJob
43
+ rpc :GetPatchJob, ::Google::Cloud::OsConfig::V1::GetPatchJobRequest, ::Google::Cloud::OsConfig::V1::PatchJob
44
44
  # Cancel a patch job. The patch job must be active. Canceled patch jobs
45
45
  # cannot be restarted.
46
- rpc :CancelPatchJob, Google::Cloud::OsConfig::V1::CancelPatchJobRequest, Google::Cloud::OsConfig::V1::PatchJob
46
+ rpc :CancelPatchJob, ::Google::Cloud::OsConfig::V1::CancelPatchJobRequest, ::Google::Cloud::OsConfig::V1::PatchJob
47
47
  # Get a list of patch jobs.
48
- rpc :ListPatchJobs, Google::Cloud::OsConfig::V1::ListPatchJobsRequest, Google::Cloud::OsConfig::V1::ListPatchJobsResponse
48
+ rpc :ListPatchJobs, ::Google::Cloud::OsConfig::V1::ListPatchJobsRequest, ::Google::Cloud::OsConfig::V1::ListPatchJobsResponse
49
49
  # Get a list of instance details for a given patch job.
50
- rpc :ListPatchJobInstanceDetails, Google::Cloud::OsConfig::V1::ListPatchJobInstanceDetailsRequest, Google::Cloud::OsConfig::V1::ListPatchJobInstanceDetailsResponse
50
+ rpc :ListPatchJobInstanceDetails, ::Google::Cloud::OsConfig::V1::ListPatchJobInstanceDetailsRequest, ::Google::Cloud::OsConfig::V1::ListPatchJobInstanceDetailsResponse
51
51
  # Create an OS Config patch deployment.
52
- rpc :CreatePatchDeployment, Google::Cloud::OsConfig::V1::CreatePatchDeploymentRequest, Google::Cloud::OsConfig::V1::PatchDeployment
52
+ rpc :CreatePatchDeployment, ::Google::Cloud::OsConfig::V1::CreatePatchDeploymentRequest, ::Google::Cloud::OsConfig::V1::PatchDeployment
53
53
  # Get an OS Config patch deployment.
54
- rpc :GetPatchDeployment, Google::Cloud::OsConfig::V1::GetPatchDeploymentRequest, Google::Cloud::OsConfig::V1::PatchDeployment
54
+ rpc :GetPatchDeployment, ::Google::Cloud::OsConfig::V1::GetPatchDeploymentRequest, ::Google::Cloud::OsConfig::V1::PatchDeployment
55
55
  # Get a page of OS Config patch deployments.
56
- rpc :ListPatchDeployments, Google::Cloud::OsConfig::V1::ListPatchDeploymentsRequest, Google::Cloud::OsConfig::V1::ListPatchDeploymentsResponse
56
+ rpc :ListPatchDeployments, ::Google::Cloud::OsConfig::V1::ListPatchDeploymentsRequest, ::Google::Cloud::OsConfig::V1::ListPatchDeploymentsResponse
57
57
  # Delete an OS Config patch deployment.
58
- rpc :DeletePatchDeployment, Google::Cloud::OsConfig::V1::DeletePatchDeploymentRequest, Google::Protobuf::Empty
58
+ rpc :DeletePatchDeployment, ::Google::Cloud::OsConfig::V1::DeletePatchDeploymentRequest, ::Google::Protobuf::Empty
59
59
  end
60
60
 
61
61
  Stub = Service.rpc_stub_class
@@ -22,6 +22,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
22
22
  optional :create_time, :message, 8, "google.protobuf.Timestamp"
23
23
  optional :update_time, :message, 9, "google.protobuf.Timestamp"
24
24
  optional :last_execute_time, :message, 10, "google.protobuf.Timestamp"
25
+ optional :rollout, :message, 11, "google.cloud.osconfig.v1.PatchRollout"
25
26
  oneof :schedule do
26
27
  optional :one_time_schedule, :message, 6, "google.cloud.osconfig.v1.OneTimeSchedule"
27
28
  optional :recurring_schedule, :message, 7, "google.cloud.osconfig.v1.RecurringSchedule"
@@ -5,6 +5,7 @@ require 'google/protobuf'
5
5
 
6
6
  require 'google/api/field_behavior_pb'
7
7
  require 'google/api/resource_pb'
8
+ require 'google/cloud/osconfig/v1/osconfig_common_pb'
8
9
  require 'google/protobuf/duration_pb'
9
10
  require 'google/protobuf/timestamp_pb'
10
11
  Google::Protobuf::DescriptorPool.generated_pool.build do
@@ -17,6 +18,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
17
18
  optional :duration, :message, 5, "google.protobuf.Duration"
18
19
  optional :dry_run, :bool, 6
19
20
  optional :display_name, :string, 8
21
+ optional :rollout, :message, 9, "google.cloud.osconfig.v1.PatchRollout"
20
22
  end
21
23
  add_message "google.cloud.osconfig.v1.GetPatchJobRequest" do
22
24
  optional :name, :string, 1
@@ -63,6 +65,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
63
65
  optional :error_message, :string, 11
64
66
  optional :percent_complete, :double, 12
65
67
  optional :patch_deployment, :string, 15
68
+ optional :rollout, :message, 16, "google.cloud.osconfig.v1.PatchRollout"
66
69
  end
67
70
  add_message "google.cloud.osconfig.v1.PatchJob.InstanceDetailsSummary" do
68
71
  optional :pending_instance_count, :int64, 1
@@ -205,6 +208,15 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
205
208
  add_message "google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel" do
206
209
  map :labels, :string, :string, 1
207
210
  end
211
+ add_message "google.cloud.osconfig.v1.PatchRollout" do
212
+ optional :mode, :enum, 1, "google.cloud.osconfig.v1.PatchRollout.Mode"
213
+ optional :disruption_budget, :message, 2, "google.cloud.osconfig.v1.FixedOrPercent"
214
+ end
215
+ add_enum "google.cloud.osconfig.v1.PatchRollout.Mode" do
216
+ value :MODE_UNSPECIFIED, 0
217
+ value :ZONE_BY_ZONE, 1
218
+ value :CONCURRENT_ZONES, 2
219
+ end
208
220
  end
209
221
  end
210
222
 
@@ -240,6 +252,8 @@ module Google
240
252
  GcsObject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.GcsObject").msgclass
241
253
  PatchInstanceFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.PatchInstanceFilter").msgclass
242
254
  PatchInstanceFilter::GroupLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.PatchInstanceFilter.GroupLabel").msgclass
255
+ PatchRollout = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.PatchRollout").msgclass
256
+ PatchRollout::Mode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1.PatchRollout.Mode").enummodule
243
257
  end
244
258
  end
245
259
  end
@@ -54,6 +54,12 @@ module Google
54
54
  # This indicates that the field may be set once in a request to create a
55
55
  # resource, but may not be changed thereafter.
56
56
  IMMUTABLE = 5
57
+
58
+ # Denotes that a (repeated) field is an unordered list.
59
+ # This indicates that the service may provide the elements of the list
60
+ # in any arbitrary order, rather than the order the user originally
61
+ # provided. Additionally, the list's order may or may not be stable.
62
+ UNORDERED_LIST = 6
57
63
  end
58
64
  end
59
65
  end
@@ -43,12 +43,12 @@ module Google
43
43
  #
44
44
  # The ResourceDescriptor Yaml config will look like:
45
45
  #
46
- # resources:
47
- # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/\\{project}/topics/\\{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/\\{project}"
46
+ # resources:
47
+ # - type: "pubsub.googleapis.com/Topic"
48
+ # name_descriptor:
49
+ # - pattern: "projects/{project}/topics/{topic}"
50
+ # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
+ # parent_name_extractor: "projects/{project}"
52
52
  #
53
53
  # Sometimes, resources have multiple patterns, typically because they can
54
54
  # live under multiple parents.
@@ -183,15 +183,24 @@ module Google
183
183
  # }
184
184
  # @!attribute [rw] plural
185
185
  # @return [::String]
186
- # The plural name used in the resource name, such as 'projects' for
187
- # the name of 'projects/\\{project}'. It is the same concept of the `plural`
188
- # field in k8s CRD spec
186
+ # The plural name used in the resource name and permission names, such as
187
+ # 'projects' for the resource name of 'projects/\\{project}' and the permission
188
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
189
+ # concept of the `plural` field in k8s CRD spec
189
190
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
191
+ #
192
+ # Note: The plural form is required even for singleton resources. See
193
+ # https://aip.dev/156
190
194
  # @!attribute [rw] singular
191
195
  # @return [::String]
192
196
  # The same concept of the `singular` field in k8s CRD spec
193
197
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
194
198
  # Such as "project" for the `resourcemanager.googleapis.com/Project` type.
199
+ # @!attribute [rw] style
200
+ # @return [::Array<::Google::Api::ResourceDescriptor::Style>]
201
+ # Style flag(s) for this resource.
202
+ # These indicate that a resource is expected to conform to a given
203
+ # style. See the specific style flags for additional information.
195
204
  class ResourceDescriptor
196
205
  include ::Google::Protobuf::MessageExts
197
206
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -211,6 +220,22 @@ module Google
211
220
  # that from being necessary once there are multiple patterns.)
212
221
  FUTURE_MULTI_PATTERN = 2
213
222
  end
223
+
224
+ # A flag representing a specific style that a resource claims to conform to.
225
+ module Style
226
+ # The unspecified value. Do not use.
227
+ STYLE_UNSPECIFIED = 0
228
+
229
+ # This resource is intended to be "declarative-friendly".
230
+ #
231
+ # Declarative-friendly resources must be more strictly consistent, and
232
+ # setting this to true communicates to tools that this resource should
233
+ # adhere to declarative-friendly expectations.
234
+ #
235
+ # Note: This is used by the API linter (linter.aip.dev) to enable
236
+ # additional checks.
237
+ DECLARATIVE_FRIENDLY = 1
238
+ end
214
239
  end
215
240
 
216
241
  # Defines a proto annotation that describes a string field that refers to
@@ -226,6 +251,17 @@ module Google
226
251
  # type: "pubsub.googleapis.com/Topic"
227
252
  # }];
228
253
  # }
254
+ #
255
+ # Occasionally, a field may reference an arbitrary resource. In this case,
256
+ # APIs use the special value * in their resource reference.
257
+ #
258
+ # Example:
259
+ #
260
+ # message GetIamPolicyRequest {
261
+ # string resource = 2 [(google.api.resource_reference) = {
262
+ # type: "*"
263
+ # }];
264
+ # }
229
265
  # @!attribute [rw] child_type
230
266
  # @return [::String]
231
267
  # The resource type of a child collection that the annotated field
@@ -234,11 +270,11 @@ module Google
234
270
  #
235
271
  # Example:
236
272
  #
237
- # message ListLogEntriesRequest {
238
- # string parent = 1 [(google.api.resource_reference) = {
239
- # child_type: "logging.googleapis.com/LogEntry"
240
- # };
241
- # }
273
+ # message ListLogEntriesRequest {
274
+ # string parent = 1 [(google.api.resource_reference) = {
275
+ # child_type: "logging.googleapis.com/LogEntry"
276
+ # };
277
+ # }
242
278
  class ResourceReference
243
279
  include ::Google::Protobuf::MessageExts
244
280
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -0,0 +1,284 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module OsConfig
23
+ module V1
24
+ # The inventory details of a VM.
25
+ # @!attribute [rw] os_info
26
+ # @return [::Google::Cloud::OsConfig::V1::Inventory::OsInfo]
27
+ # Base level operating system information for the VM.
28
+ # @!attribute [rw] items
29
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::OsConfig::V1::Inventory::Item}]
30
+ # Inventory items related to the VM keyed by an opaque unique identifier for
31
+ # each inventory item. The identifier is unique to each distinct and
32
+ # addressable inventory item and will change, when there is a new package
33
+ # version.
34
+ class Inventory
35
+ include ::Google::Protobuf::MessageExts
36
+ extend ::Google::Protobuf::MessageExts::ClassMethods
37
+
38
+ # Operating system information for the VM.
39
+ # @!attribute [rw] hostname
40
+ # @return [::String]
41
+ # The VM hostname.
42
+ # @!attribute [rw] long_name
43
+ # @return [::String]
44
+ # The operating system long name.
45
+ # For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019
46
+ # Datacenter'.
47
+ # @!attribute [rw] short_name
48
+ # @return [::String]
49
+ # The operating system short name.
50
+ # For example, 'windows' or 'debian'.
51
+ # @!attribute [rw] version
52
+ # @return [::String]
53
+ # The version of the operating system.
54
+ # @!attribute [rw] architecture
55
+ # @return [::String]
56
+ # The system architecture of the operating system.
57
+ # @!attribute [rw] kernel_version
58
+ # @return [::String]
59
+ # The kernel version of the operating system.
60
+ # @!attribute [rw] kernel_release
61
+ # @return [::String]
62
+ # The kernel release of the operating system.
63
+ # @!attribute [rw] osconfig_agent_version
64
+ # @return [::String]
65
+ # The current version of the OS Config agent running on the VM.
66
+ class OsInfo
67
+ include ::Google::Protobuf::MessageExts
68
+ extend ::Google::Protobuf::MessageExts::ClassMethods
69
+ end
70
+
71
+ # A single piece of inventory on a VM.
72
+ # @!attribute [rw] id
73
+ # @return [::String]
74
+ # Identifier for this item, unique across items for this VM.
75
+ # @!attribute [rw] origin_type
76
+ # @return [::Google::Cloud::OsConfig::V1::Inventory::Item::OriginType]
77
+ # The origin of this inventory item.
78
+ # @!attribute [rw] create_time
79
+ # @return [::Google::Protobuf::Timestamp]
80
+ # When this inventory item was first detected.
81
+ # @!attribute [rw] update_time
82
+ # @return [::Google::Protobuf::Timestamp]
83
+ # When this inventory item was last modified.
84
+ # @!attribute [rw] type
85
+ # @return [::Google::Cloud::OsConfig::V1::Inventory::Item::Type]
86
+ # The specific type of inventory, correlating to its specific details.
87
+ # @!attribute [rw] installed_package
88
+ # @return [::Google::Cloud::OsConfig::V1::Inventory::SoftwarePackage]
89
+ # Software package present on the VM instance.
90
+ # @!attribute [rw] available_package
91
+ # @return [::Google::Cloud::OsConfig::V1::Inventory::SoftwarePackage]
92
+ # Software package available to be installed on the VM instance.
93
+ class Item
94
+ include ::Google::Protobuf::MessageExts
95
+ extend ::Google::Protobuf::MessageExts::ClassMethods
96
+
97
+ # The origin of a specific inventory item.
98
+ module OriginType
99
+ # Invalid. An origin type must be specified.
100
+ ORIGIN_TYPE_UNSPECIFIED = 0
101
+
102
+ # This inventory item was discovered as the result of the agent
103
+ # reporting inventory via the reporting API.
104
+ INVENTORY_REPORT = 1
105
+ end
106
+
107
+ # The different types of inventory that are tracked on a VM.
108
+ module Type
109
+ # Invalid. An type must be specified.
110
+ TYPE_UNSPECIFIED = 0
111
+
112
+ # This represents a package that is installed on the VM.
113
+ INSTALLED_PACKAGE = 1
114
+
115
+ # This represents an update that is available for a package.
116
+ AVAILABLE_PACKAGE = 2
117
+ end
118
+ end
119
+
120
+ # Software package information of the operating system.
121
+ # @!attribute [rw] yum_package
122
+ # @return [::Google::Cloud::OsConfig::V1::Inventory::VersionedPackage]
123
+ # Yum package info.
124
+ # For details about the yum package manager, see
125
+ # https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum.
126
+ # @!attribute [rw] apt_package
127
+ # @return [::Google::Cloud::OsConfig::V1::Inventory::VersionedPackage]
128
+ # Details of an APT package.
129
+ # For details about the apt package manager, see
130
+ # https://wiki.debian.org/Apt.
131
+ # @!attribute [rw] zypper_package
132
+ # @return [::Google::Cloud::OsConfig::V1::Inventory::VersionedPackage]
133
+ # Details of a Zypper package.
134
+ # For details about the Zypper package manager, see
135
+ # https://en.opensuse.org/SDB:Zypper_manual.
136
+ # @!attribute [rw] googet_package
137
+ # @return [::Google::Cloud::OsConfig::V1::Inventory::VersionedPackage]
138
+ # Details of a Googet package.
139
+ # For details about the googet package manager, see
140
+ # https://github.com/google/googet.
141
+ # @!attribute [rw] zypper_patch
142
+ # @return [::Google::Cloud::OsConfig::V1::Inventory::ZypperPatch]
143
+ # Details of a Zypper patch.
144
+ # For details about the Zypper package manager, see
145
+ # https://en.opensuse.org/SDB:Zypper_manual.
146
+ # @!attribute [rw] wua_package
147
+ # @return [::Google::Cloud::OsConfig::V1::Inventory::WindowsUpdatePackage]
148
+ # Details of a Windows Update package.
149
+ # See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for
150
+ # information about Windows Update.
151
+ # @!attribute [rw] qfe_package
152
+ # @return [::Google::Cloud::OsConfig::V1::Inventory::WindowsQuickFixEngineeringPackage]
153
+ # Details of a Windows Quick Fix engineering package.
154
+ # See
155
+ # https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
156
+ # for info in Windows Quick Fix Engineering.
157
+ # @!attribute [rw] cos_package
158
+ # @return [::Google::Cloud::OsConfig::V1::Inventory::VersionedPackage]
159
+ # Details of a COS package.
160
+ class SoftwarePackage
161
+ include ::Google::Protobuf::MessageExts
162
+ extend ::Google::Protobuf::MessageExts::ClassMethods
163
+ end
164
+
165
+ # Information related to the a standard versioned package. This includes
166
+ # package info for APT, Yum, Zypper, and Googet package managers.
167
+ # @!attribute [rw] package_name
168
+ # @return [::String]
169
+ # The name of the package.
170
+ # @!attribute [rw] architecture
171
+ # @return [::String]
172
+ # The system architecture this package is intended for.
173
+ # @!attribute [rw] version
174
+ # @return [::String]
175
+ # The version of the package.
176
+ class VersionedPackage
177
+ include ::Google::Protobuf::MessageExts
178
+ extend ::Google::Protobuf::MessageExts::ClassMethods
179
+ end
180
+
181
+ # Details related to a Windows Update package.
182
+ # Field data and names are taken from Windows Update API IUpdate Interface:
183
+ # https://docs.microsoft.com/en-us/windows/win32/api/_wua/
184
+ # Descriptive fields like title, and description are localized based on
185
+ # the locale of the VM being updated.
186
+ # @!attribute [rw] title
187
+ # @return [::String]
188
+ # The localized title of the update package.
189
+ # @!attribute [rw] description
190
+ # @return [::String]
191
+ # The localized description of the update package.
192
+ # @!attribute [rw] categories
193
+ # @return [::Array<::Google::Cloud::OsConfig::V1::Inventory::WindowsUpdatePackage::WindowsUpdateCategory>]
194
+ # The categories that are associated with this update package.
195
+ # @!attribute [rw] kb_article_ids
196
+ # @return [::Array<::String>]
197
+ # A collection of Microsoft Knowledge Base article IDs that are associated
198
+ # with the update package.
199
+ # @!attribute [rw] support_url
200
+ # @return [::String]
201
+ # A hyperlink to the language-specific support information for the update.
202
+ # @!attribute [rw] more_info_urls
203
+ # @return [::Array<::String>]
204
+ # A collection of URLs that provide more information about the update
205
+ # package.
206
+ # @!attribute [rw] update_id
207
+ # @return [::String]
208
+ # Gets the identifier of an update package. Stays the same across
209
+ # revisions.
210
+ # @!attribute [rw] revision_number
211
+ # @return [::Integer]
212
+ # The revision number of this update package.
213
+ # @!attribute [rw] last_deployment_change_time
214
+ # @return [::Google::Protobuf::Timestamp]
215
+ # The last published date of the update, in (UTC) date and time.
216
+ class WindowsUpdatePackage
217
+ include ::Google::Protobuf::MessageExts
218
+ extend ::Google::Protobuf::MessageExts::ClassMethods
219
+
220
+ # Categories specified by the Windows Update.
221
+ # @!attribute [rw] id
222
+ # @return [::String]
223
+ # The identifier of the windows update category.
224
+ # @!attribute [rw] name
225
+ # @return [::String]
226
+ # The name of the windows update category.
227
+ class WindowsUpdateCategory
228
+ include ::Google::Protobuf::MessageExts
229
+ extend ::Google::Protobuf::MessageExts::ClassMethods
230
+ end
231
+ end
232
+
233
+ # Details related to a Zypper Patch.
234
+ # @!attribute [rw] patch_name
235
+ # @return [::String]
236
+ # The name of the patch.
237
+ # @!attribute [rw] category
238
+ # @return [::String]
239
+ # The category of the patch.
240
+ # @!attribute [rw] severity
241
+ # @return [::String]
242
+ # The severity specified for this patch
243
+ # @!attribute [rw] summary
244
+ # @return [::String]
245
+ # Any summary information provided about this patch.
246
+ class ZypperPatch
247
+ include ::Google::Protobuf::MessageExts
248
+ extend ::Google::Protobuf::MessageExts::ClassMethods
249
+ end
250
+
251
+ # Information related to a Quick Fix Engineering package.
252
+ # Fields are taken from Windows QuickFixEngineering Interface and match
253
+ # the source names:
254
+ # https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering
255
+ # @!attribute [rw] caption
256
+ # @return [::String]
257
+ # A short textual description of the QFE update.
258
+ # @!attribute [rw] description
259
+ # @return [::String]
260
+ # A textual description of the QFE update.
261
+ # @!attribute [rw] hot_fix_id
262
+ # @return [::String]
263
+ # Unique identifier associated with a particular QFE update.
264
+ # @!attribute [rw] install_time
265
+ # @return [::Google::Protobuf::Timestamp]
266
+ # Date that the QFE update was installed. Mapped from installed_on field.
267
+ class WindowsQuickFixEngineeringPackage
268
+ include ::Google::Protobuf::MessageExts
269
+ extend ::Google::Protobuf::MessageExts::ClassMethods
270
+ end
271
+
272
+ # @!attribute [rw] key
273
+ # @return [::String]
274
+ # @!attribute [rw] value
275
+ # @return [::Google::Cloud::OsConfig::V1::Inventory::Item]
276
+ class ItemsEntry
277
+ include ::Google::Protobuf::MessageExts
278
+ extend ::Google::Protobuf::MessageExts::ClassMethods
279
+ end
280
+ end
281
+ end
282
+ end
283
+ end
284
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2020 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module OsConfig
23
+ module V1
24
+ # Message encapsulating a value that can be either absolute ("fixed") or
25
+ # relative ("percent") to a value.
26
+ # @!attribute [rw] fixed
27
+ # @return [::Integer]
28
+ # Specifies a fixed value.
29
+ # @!attribute [rw] percent
30
+ # @return [::Integer]
31
+ # Specifies the relative value defined as a percentage, which will be
32
+ # multiplied by a reference value.
33
+ class FixedOrPercent
34
+ include ::Google::Protobuf::MessageExts
35
+ extend ::Google::Protobuf::MessageExts::ClassMethods
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -34,8 +34,8 @@ module Google
34
34
  # This field is ignored when you create a new patch deployment.
35
35
  # @!attribute [rw] description
36
36
  # @return [::String]
37
- # Optional. Description of the patch deployment. Length of the description is limited
38
- # to 1024 characters.
37
+ # Optional. Description of the patch deployment. Length of the description is
38
+ # limited to 1024 characters.
39
39
  # @!attribute [rw] instance_filter
40
40
  # @return [::Google::Cloud::OsConfig::V1::PatchInstanceFilter]
41
41
  # Required. VM instances to patch.
@@ -44,7 +44,8 @@ module Google
44
44
  # Optional. Patch configuration that is applied.
45
45
  # @!attribute [rw] duration
46
46
  # @return [::Google::Protobuf::Duration]
47
- # Optional. Duration of the patch. After the duration ends, the patch times out.
47
+ # Optional. Duration of the patch. After the duration ends, the patch times
48
+ # out.
48
49
  # @!attribute [rw] one_time_schedule
49
50
  # @return [::Google::Cloud::OsConfig::V1::OneTimeSchedule]
50
51
  # Required. Schedule a one-time execution.
@@ -64,6 +65,9 @@ module Google
64
65
  # Output only. The last time a patch job was started by this deployment.
65
66
  # Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text
66
67
  # format.
68
+ # @!attribute [rw] rollout
69
+ # @return [::Google::Cloud::OsConfig::V1::PatchRollout]
70
+ # Optional. Rollout strategy of the patch job.
67
71
  class PatchDeployment
68
72
  include ::Google::Protobuf::MessageExts
69
73
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -90,8 +94,8 @@ module Google
90
94
  # Defaults to `create_time` of the patch deployment.
91
95
  # @!attribute [rw] end_time
92
96
  # @return [::Google::Protobuf::Timestamp]
93
- # Optional. The end time at which a recurring patch deployment schedule is no longer
94
- # active.
97
+ # Optional. The end time at which a recurring patch deployment schedule is no
98
+ # longer active.
95
99
  # @!attribute [rw] time_of_day
96
100
  # @return [::Google::Type::TimeOfDay]
97
101
  # Required. Time of the day to run a recurring deployment.
@@ -145,10 +149,10 @@ module Google
145
149
  # Required. Week day in a month.
146
150
  # @!attribute [rw] month_day
147
151
  # @return [::Integer]
148
- # Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1
149
- # indicates the last day of the month.
150
- # Months without the target day will be skipped. For example, a schedule to
151
- # run "every month on the 31st" will not run in February, April, June, etc.
152
+ # Required. One day of the month. 1-31 indicates the 1st to the 31st day.
153
+ # -1 indicates the last day of the month. Months without the target day
154
+ # will be skipped. For example, a schedule to run "every month on the 31st"
155
+ # will not run in February, April, June, etc.
152
156
  class MonthlySchedule
153
157
  include ::Google::Protobuf::MessageExts
154
158
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -157,8 +161,8 @@ module Google
157
161
  # Represents one week day in a month. An example is "the 4th Sunday".
158
162
  # @!attribute [rw] week_ordinal
159
163
  # @return [::Integer]
160
- # Required. Week number in a month. 1-4 indicates the 1st to 4th week of the month. -1
161
- # indicates the last week of the month.
164
+ # Required. Week number in a month. 1-4 indicates the 1st to 4th week of the
165
+ # month. -1 indicates the last week of the month.
162
166
  # @!attribute [rw] day_of_week
163
167
  # @return [::Google::Type::DayOfWeek]
164
168
  # Required. A day of the week.
@@ -170,11 +174,12 @@ module Google
170
174
  # A request message for creating a patch deployment.
171
175
  # @!attribute [rw] parent
172
176
  # @return [::String]
173
- # Required. The project to apply this patch deployment to in the form `projects/*`.
177
+ # Required. The project to apply this patch deployment to in the form
178
+ # `projects/*`.
174
179
  # @!attribute [rw] patch_deployment_id
175
180
  # @return [::String]
176
- # Required. A name for the patch deployment in the project. When creating a name
177
- # the following rules apply:
181
+ # Required. A name for the patch deployment in the project. When creating a
182
+ # name the following rules apply:
178
183
  # * Must contain only lowercase letters, numbers, and hyphens.
179
184
  # * Must start with a letter.
180
185
  # * Must be between 1-63 characters.
@@ -204,11 +209,13 @@ module Google
204
209
  # Required. The resource name of the parent in the form `projects/*`.
205
210
  # @!attribute [rw] page_size
206
211
  # @return [::Integer]
207
- # Optional. The maximum number of patch deployments to return. Default is 100.
212
+ # Optional. The maximum number of patch deployments to return. Default is
213
+ # 100.
208
214
  # @!attribute [rw] page_token
209
215
  # @return [::String]
210
- # Optional. A pagination token returned from a previous call to ListPatchDeployments
211
- # that indicates where this listing should continue from.
216
+ # Optional. A pagination token returned from a previous call to
217
+ # ListPatchDeployments that indicates where this listing should continue
218
+ # from.
212
219
  class ListPatchDeploymentsRequest
213
220
  include ::Google::Protobuf::MessageExts
214
221
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -32,8 +32,8 @@ module Google
32
32
  # to 1024 characters.
33
33
  # @!attribute [rw] instance_filter
34
34
  # @return [::Google::Cloud::OsConfig::V1::PatchInstanceFilter]
35
- # Required. Instances to patch, either explicitly or filtered by some criteria such
36
- # as zone or labels.
35
+ # Required. Instances to patch, either explicitly or filtered by some
36
+ # criteria such as zone or labels.
37
37
  # @!attribute [rw] patch_config
38
38
  # @return [::Google::Cloud::OsConfig::V1::PatchConfig]
39
39
  # Patch configuration being applied. If omitted, instances are
@@ -49,6 +49,9 @@ module Google
49
49
  # @!attribute [rw] display_name
50
50
  # @return [::String]
51
51
  # Display name for this patch job. This does not have to be unique.
52
+ # @!attribute [rw] rollout
53
+ # @return [::Google::Cloud::OsConfig::V1::PatchRollout]
54
+ # Rollout strategy of the patch job.
52
55
  class ExecutePatchJobRequest
53
56
  include ::Google::Protobuf::MessageExts
54
57
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -66,7 +69,8 @@ module Google
66
69
  # Request to list details for all instances that are part of a patch job.
67
70
  # @!attribute [rw] parent
68
71
  # @return [::String]
69
- # Required. The parent for the instances are in the form of `projects/*/patchJobs/*`.
72
+ # Required. The parent for the instances are in the form of
73
+ # `projects/*/patchJobs/*`.
70
74
  # @!attribute [rw] page_size
71
75
  # @return [::Integer]
72
76
  # The maximum number of instance details records to return. Default is 100.
@@ -157,7 +161,7 @@ module Google
157
161
  # A high level representation of a patch job that is either in progress
158
162
  # or has completed.
159
163
  #
160
- # Instances details are not included in the job. To paginate through instance
164
+ # Instance details are not included in the job. To paginate through instance
161
165
  # details, use ListPatchJobInstanceDetails.
162
166
  #
163
167
  # For more information about patch jobs, see
@@ -182,7 +186,7 @@ module Google
182
186
  # Last time this patch job was updated.
183
187
  # @!attribute [rw] state
184
188
  # @return [::Google::Cloud::OsConfig::V1::PatchJob::State]
185
- # The current state of the PatchJob .
189
+ # The current state of the PatchJob.
186
190
  # @!attribute [rw] instance_filter
187
191
  # @return [::Google::Cloud::OsConfig::V1::PatchInstanceFilter]
188
192
  # Instances to patch.
@@ -211,6 +215,9 @@ module Google
211
215
  # @!attribute [r] patch_deployment
212
216
  # @return [::String]
213
217
  # Output only. Name of the patch deployment that created this patch job.
218
+ # @!attribute [rw] rollout
219
+ # @return [::Google::Cloud::OsConfig::V1::PatchRollout]
220
+ # Rollout strategy being applied.
214
221
  class PatchJob
215
222
  include ::Google::Protobuf::MessageExts
216
223
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -707,6 +714,58 @@ module Google
707
714
  end
708
715
  end
709
716
  end
717
+
718
+ # Patch rollout configuration specifications. Contains details on the
719
+ # concurrency control when applying patch(es) to all targeted VMs.
720
+ # @!attribute [rw] mode
721
+ # @return [::Google::Cloud::OsConfig::V1::PatchRollout::Mode]
722
+ # Mode of the patch rollout.
723
+ # @!attribute [rw] disruption_budget
724
+ # @return [::Google::Cloud::OsConfig::V1::FixedOrPercent]
725
+ # The maximum number (or percentage) of VMs per zone to disrupt at any given
726
+ # moment. The number of VMs calculated from multiplying the percentage by the
727
+ # total number of VMs in a zone is rounded up.
728
+ #
729
+ # During patching, a VM is considered disrupted from the time the agent is
730
+ # notified to begin until patching has completed. This disruption time
731
+ # includes the time to complete reboot and any post-patch steps.
732
+ #
733
+ # A VM contributes to the disruption budget if its patching operation fails
734
+ # either when applying the patches, running pre or post patch steps, or if it
735
+ # fails to respond with a success notification before timing out. VMs that
736
+ # are not running or do not have an active agent do not count toward this
737
+ # disruption budget.
738
+ #
739
+ # For zone-by-zone rollouts, if the disruption budget in a zone is exceeded,
740
+ # the patch job stops, because continuing to the next zone requires
741
+ # completion of the patch process in the previous zone.
742
+ #
743
+ # For example, if the disruption budget has a fixed value of `10`, and 8 VMs
744
+ # fail to patch in the current zone, the patch job continues to patch 2 VMs
745
+ # at a time until the zone is completed. When that zone is completed
746
+ # successfully, patching begins with 10 VMs at a time in the next zone. If 10
747
+ # VMs in the next zone fail to patch, the patch job stops.
748
+ class PatchRollout
749
+ include ::Google::Protobuf::MessageExts
750
+ extend ::Google::Protobuf::MessageExts::ClassMethods
751
+
752
+ # Type of the rollout.
753
+ module Mode
754
+ # Mode must be specified.
755
+ MODE_UNSPECIFIED = 0
756
+
757
+ # Patches are applied one zone at a time. The patch job begins in the
758
+ # region with the lowest number of targeted VMs. Within the region,
759
+ # patching begins in the zone with the lowest number of targeted VMs. If
760
+ # multiple regions (or zones within a region) have the same number of
761
+ # targeted VMs, a tie-breaker is achieved by sorting the regions or zones
762
+ # in alphabetical order.
763
+ ZONE_BY_ZONE = 1
764
+
765
+ # Patches are applied to VMs in all zones at the same time.
766
+ CONCURRENT_ZONES = 2
767
+ end
768
+ end
710
769
  end
711
770
  end
712
771
  end
@@ -70,7 +70,16 @@ module Google
70
70
  # .setNanos((int) ((millis % 1000) * 1000000)).build();
71
71
  #
72
72
  #
73
- # Example 5: Compute Timestamp from current time in Python.
73
+ # Example 5: Compute Timestamp from Java `Instant.now()`.
74
+ #
75
+ # Instant now = Instant.now();
76
+ #
77
+ # Timestamp timestamp =
78
+ # Timestamp.newBuilder().setSeconds(now.getEpochSecond())
79
+ # .setNanos(now.getNano()).build();
80
+ #
81
+ #
82
+ # Example 6: Compute Timestamp from current time in Python.
74
83
  #
75
84
  # timestamp = Timestamp()
76
85
  # timestamp.GetCurrentTime()
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-os_config-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-25 00:00:00.000000000 Z
11
+ date: 2021-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -151,7 +151,10 @@ dependencies:
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0.9'
153
153
  description: Cloud OS Config provides OS management tools that can be used for patch
154
- management, patch compliance, and configuration management on VM instances.
154
+ management, patch compliance, and configuration management on VM instances. Note
155
+ that google-cloud-os_config-v1 is a version-specific client library. For most uses,
156
+ we recommend installing the main client library google-cloud-os_config instead.
157
+ See the readme for more details.
155
158
  email: googleapis-packages@google.com
156
159
  executables: []
157
160
  extensions: []
@@ -168,6 +171,8 @@ files:
168
171
  - lib/google/cloud/os_config/v1/os_config_service/credentials.rb
169
172
  - lib/google/cloud/os_config/v1/os_config_service/paths.rb
170
173
  - lib/google/cloud/os_config/v1/version.rb
174
+ - lib/google/cloud/osconfig/v1/inventory_pb.rb
175
+ - lib/google/cloud/osconfig/v1/osconfig_common_pb.rb
171
176
  - lib/google/cloud/osconfig/v1/osconfig_service_pb.rb
172
177
  - lib/google/cloud/osconfig/v1/osconfig_service_services_pb.rb
173
178
  - lib/google/cloud/osconfig/v1/patch_deployments_pb.rb
@@ -175,6 +180,8 @@ files:
175
180
  - proto_docs/README.md
176
181
  - proto_docs/google/api/field_behavior.rb
177
182
  - proto_docs/google/api/resource.rb
183
+ - proto_docs/google/cloud/osconfig/v1/inventory.rb
184
+ - proto_docs/google/cloud/osconfig/v1/osconfig_common.rb
178
185
  - proto_docs/google/cloud/osconfig/v1/patch_deployments.rb
179
186
  - proto_docs/google/cloud/osconfig/v1/patch_jobs.rb
180
187
  - proto_docs/google/protobuf/duration.rb
@@ -202,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
209
  - !ruby/object:Gem::Version
203
210
  version: '0'
204
211
  requirements: []
205
- rubygems_version: 3.1.3
212
+ rubygems_version: 3.2.6
206
213
  signing_key:
207
214
  specification_version: 4
208
215
  summary: API Client library for the Cloud OS Config V1 API