google-cloud-os_config-v1alpha 0.2.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +1 -1
- data/AUTHENTICATION.md +7 -25
- data/README.md +11 -6
- data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/client.rb +238 -7
- data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/operations.rb +3 -0
- data/lib/google/cloud/os_config/v1alpha/os_config_zonal_service/paths.rb +42 -0
- data/lib/google/cloud/os_config/v1alpha/version.rb +1 -1
- data/lib/google/cloud/os_config/v1alpha.rb +2 -0
- data/lib/google/cloud/osconfig/v1alpha/config_common_pb.rb +2 -0
- data/lib/google/cloud/osconfig/v1alpha/instance_os_policies_compliance_pb.rb +3 -1
- data/lib/google/cloud/osconfig/v1alpha/inventory_pb.rb +3 -1
- data/lib/google/cloud/osconfig/v1alpha/os_policy_assignment_reports_pb.rb +94 -0
- data/lib/google/cloud/osconfig/v1alpha/os_policy_assignments_pb.rb +10 -1
- data/lib/google/cloud/osconfig/v1alpha/os_policy_pb.rb +9 -1
- data/lib/google/cloud/osconfig/v1alpha/osconfig_common_pb.rb +2 -0
- data/lib/google/cloud/osconfig/v1alpha/osconfig_zonal_service_pb.rb +3 -1
- data/lib/google/cloud/osconfig/v1alpha/osconfig_zonal_service_services_pb.rb +6 -0
- data/lib/google/cloud/osconfig/v1alpha/vulnerability_pb.rb +12 -1
- data/proto_docs/google/api/resource.rb +10 -71
- data/proto_docs/google/cloud/osconfig/v1alpha/inventory.rb +9 -14
- data/proto_docs/google/cloud/osconfig/v1alpha/os_policy.rb +44 -11
- data/proto_docs/google/cloud/osconfig/v1alpha/os_policy_assignment_reports.rb +293 -0
- data/proto_docs/google/cloud/osconfig/v1alpha/os_policy_assignments.rb +33 -5
- data/proto_docs/google/cloud/osconfig/v1alpha/vulnerability.rb +38 -5
- data/proto_docs/google/protobuf/any.rb +3 -3
- metadata +14 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46c2758b34fb24bc3371682c68371b80adfa2875f99e5f05cd11765a5b124921
|
4
|
+
data.tar.gz: 2caeda7b2ecee0e0c42b8bb0bdfb94710cbb727b44dd22de31ca058b0aa84fea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c8fe8d402e40fc72cbe8a98a292b3e5d604f9e19f4a37ef3c835f4a69220e4f5b33c57c7f3de0db2540d7744737503c740a7c7989e343ca04568397135f33b8
|
7
|
+
data.tar.gz: fdc16ec58035150656f2c337683dbc31c1642fa1ea2a2f2de91f0c54fc1b69754d2aaf0183fd449853c0bc60282230d486a4876458360b69b057c5fa2b753857
|
data/.yardopts
CHANGED
data/AUTHENTICATION.md
CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
|
|
120
120
|
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
|
121
121
|
*should* only be used during development.
|
122
122
|
|
123
|
-
[gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
|
124
|
-
[dev-console]: https://console.cloud.google.com/project
|
125
|
-
|
126
|
-
[enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
|
127
|
-
|
128
|
-
[create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
|
129
|
-
[create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
|
130
|
-
[reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
|
131
|
-
|
132
123
|
## Creating a Service Account
|
133
124
|
|
134
125
|
Google Cloud requires **Service Account Credentials** to
|
@@ -139,31 +130,22 @@ If you are not running this client within
|
|
139
130
|
[Google Cloud Platform environments](#google-cloud-platform-environments), you
|
140
131
|
need a Google Developers service account.
|
141
132
|
|
142
|
-
1. Visit the [Google
|
133
|
+
1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
|
143
134
|
2. Create a new project or click on an existing project.
|
144
|
-
3. Activate the
|
135
|
+
3. Activate the menu in the upper left and select **APIs & Services**. From
|
145
136
|
here, you will enable the APIs that your application requires.
|
146
137
|
|
147
|
-
![Enable the APIs that your application requires][enable-apis]
|
148
|
-
|
149
138
|
*Note: You may need to enable billing in order to use these services.*
|
150
139
|
|
151
140
|
4. Select **Credentials** from the side navigation.
|
152
141
|
|
153
|
-
|
154
|
-
|
155
|
-
![Create a new service account][create-new-service-account]
|
156
|
-
|
157
|
-
![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
|
158
|
-
|
159
|
-
Find the "Add credentials" drop down and select "Service account" to be
|
160
|
-
guided through downloading a new JSON key file.
|
142
|
+
Find the "Create credentials" drop down near the top of the page, and select
|
143
|
+
"Service account" to be guided through downloading a new JSON key file.
|
161
144
|
|
162
145
|
If you want to re-use an existing service account, you can easily generate a
|
163
|
-
new key file. Just select the account you wish to re-use,
|
164
|
-
|
165
|
-
|
166
|
-
![Re-use an existing service account][reuse-service-account]
|
146
|
+
new key file. Just select the account you wish to re-use, click the pencil
|
147
|
+
tool on the right side to edit the service account, select the **Keys** tab,
|
148
|
+
and then select **Add Key**.
|
167
149
|
|
168
150
|
The key file you download will be used by this library to authenticate API
|
169
151
|
requests and should be stored in a secure location.
|
data/README.md
CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::OsConfig::V1alpha::CreateOSPolicyAssignmentRequest.ne
|
|
37
37
|
response = client.create_os_policy_assignment request
|
38
38
|
```
|
39
39
|
|
40
|
-
View the [Client Library Documentation](https://
|
40
|
+
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-os_config-v1alpha/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
43
|
See also the [Product Documentation](https://cloud.google.com/compute/docs/manage-os)
|
@@ -69,16 +69,21 @@ module GRPC
|
|
69
69
|
end
|
70
70
|
```
|
71
71
|
|
72
|
+
|
73
|
+
## Google Cloud Samples
|
74
|
+
|
75
|
+
To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
|
76
|
+
|
72
77
|
## Supported Ruby Versions
|
73
78
|
|
74
|
-
This library is supported on Ruby 2.
|
79
|
+
This library is supported on Ruby 2.6+.
|
75
80
|
|
76
81
|
Google provides official support for Ruby versions that are actively supported
|
77
82
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
78
|
-
in security maintenance, and not end of life.
|
79
|
-
|
80
|
-
|
81
|
-
|
83
|
+
in security maintenance, and not end of life. Older versions of Ruby _may_
|
84
|
+
still work, but are unsupported and not recommended. See
|
85
|
+
https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
|
86
|
+
support schedule.
|
82
87
|
|
83
88
|
## Which client should I use?
|
84
89
|
|
@@ -143,6 +143,7 @@ module Google
|
|
143
143
|
|
144
144
|
@operations_client = Operations.new do |config|
|
145
145
|
config.credentials = credentials
|
146
|
+
config.quota_project = @quota_project_id
|
146
147
|
config.endpoint = @config.endpoint
|
147
148
|
end
|
148
149
|
|
@@ -778,6 +779,8 @@ module Google
|
|
778
779
|
# Get OS policies compliance data for the specified Compute Engine VM
|
779
780
|
# instance.
|
780
781
|
#
|
782
|
+
# @deprecated This method is deprecated and may be removed in the next major version update.
|
783
|
+
#
|
781
784
|
# @overload get_instance_os_policies_compliance(request, options = nil)
|
782
785
|
# Pass arguments to `get_instance_os_policies_compliance` via a request object, either of type
|
783
786
|
# {::Google::Cloud::OsConfig::V1alpha::GetInstanceOSPoliciesComplianceRequest} or an equivalent Hash.
|
@@ -872,6 +875,8 @@ module Google
|
|
872
875
|
# List OS policies compliance data for all Compute Engine VM instances in the
|
873
876
|
# specified zone.
|
874
877
|
#
|
878
|
+
# @deprecated This method is deprecated and may be removed in the next major version update.
|
879
|
+
#
|
875
880
|
# @overload list_instance_os_policies_compliances(request, options = nil)
|
876
881
|
# Pass arguments to `list_instance_os_policies_compliances` via a request object, either of type
|
877
882
|
# {::Google::Cloud::OsConfig::V1alpha::ListInstanceOSPoliciesCompliancesRequest} or an equivalent Hash.
|
@@ -975,6 +980,222 @@ module Google
|
|
975
980
|
raise ::Google::Cloud::Error.from_error(e)
|
976
981
|
end
|
977
982
|
|
983
|
+
##
|
984
|
+
# Get the OS policy asssignment report for the specified Compute Engine VM
|
985
|
+
# instance.
|
986
|
+
#
|
987
|
+
# @overload get_os_policy_assignment_report(request, options = nil)
|
988
|
+
# Pass arguments to `get_os_policy_assignment_report` via a request object, either of type
|
989
|
+
# {::Google::Cloud::OsConfig::V1alpha::GetOSPolicyAssignmentReportRequest} or an equivalent Hash.
|
990
|
+
#
|
991
|
+
# @param request [::Google::Cloud::OsConfig::V1alpha::GetOSPolicyAssignmentReportRequest, ::Hash]
|
992
|
+
# A request object representing the call parameters. Required. To specify no
|
993
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
994
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
995
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
996
|
+
#
|
997
|
+
# @overload get_os_policy_assignment_report(name: nil)
|
998
|
+
# Pass arguments to `get_os_policy_assignment_report` via keyword arguments. Note that at
|
999
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1000
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1001
|
+
#
|
1002
|
+
# @param name [::String]
|
1003
|
+
# Required. API resource name for OS policy assignment report.
|
1004
|
+
#
|
1005
|
+
# Format:
|
1006
|
+
# `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report`
|
1007
|
+
#
|
1008
|
+
# For `{project}`, either `project-number` or `project-id` can be provided.
|
1009
|
+
# For `{instance_id}`, either Compute Engine `instance-id` or `instance-name`
|
1010
|
+
# can be provided.
|
1011
|
+
# For `{assignment_id}`, the OSPolicyAssignment id must be provided.
|
1012
|
+
#
|
1013
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1014
|
+
# @yieldparam response [::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignmentReport]
|
1015
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1016
|
+
#
|
1017
|
+
# @return [::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignmentReport]
|
1018
|
+
#
|
1019
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1020
|
+
#
|
1021
|
+
# @example Basic example
|
1022
|
+
# require "google/cloud/os_config/v1alpha"
|
1023
|
+
#
|
1024
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1025
|
+
# client = Google::Cloud::OsConfig::V1alpha::OsConfigZonalService::Client.new
|
1026
|
+
#
|
1027
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1028
|
+
# request = Google::Cloud::OsConfig::V1alpha::GetOSPolicyAssignmentReportRequest.new
|
1029
|
+
#
|
1030
|
+
# # Call the get_os_policy_assignment_report method.
|
1031
|
+
# result = client.get_os_policy_assignment_report request
|
1032
|
+
#
|
1033
|
+
# # The returned object is of type Google::Cloud::OsConfig::V1alpha::OSPolicyAssignmentReport.
|
1034
|
+
# p result
|
1035
|
+
#
|
1036
|
+
def get_os_policy_assignment_report request, options = nil
|
1037
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1038
|
+
|
1039
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::GetOSPolicyAssignmentReportRequest
|
1040
|
+
|
1041
|
+
# Converts hash and nil to an options object
|
1042
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1043
|
+
|
1044
|
+
# Customize the options with defaults
|
1045
|
+
metadata = @config.rpcs.get_os_policy_assignment_report.metadata.to_h
|
1046
|
+
|
1047
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1048
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1049
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1050
|
+
gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION
|
1051
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1052
|
+
|
1053
|
+
header_params = {}
|
1054
|
+
if request.name
|
1055
|
+
header_params["name"] = request.name
|
1056
|
+
end
|
1057
|
+
|
1058
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1059
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1060
|
+
|
1061
|
+
options.apply_defaults timeout: @config.rpcs.get_os_policy_assignment_report.timeout,
|
1062
|
+
metadata: metadata,
|
1063
|
+
retry_policy: @config.rpcs.get_os_policy_assignment_report.retry_policy
|
1064
|
+
|
1065
|
+
options.apply_defaults timeout: @config.timeout,
|
1066
|
+
metadata: @config.metadata,
|
1067
|
+
retry_policy: @config.retry_policy
|
1068
|
+
|
1069
|
+
@os_config_zonal_service_stub.call_rpc :get_os_policy_assignment_report, request, options: options do |response, operation|
|
1070
|
+
yield response, operation if block_given?
|
1071
|
+
return response
|
1072
|
+
end
|
1073
|
+
rescue ::GRPC::BadStatus => e
|
1074
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1075
|
+
end
|
1076
|
+
|
1077
|
+
##
|
1078
|
+
# List OS policy asssignment reports for all Compute Engine VM instances in
|
1079
|
+
# the specified zone.
|
1080
|
+
#
|
1081
|
+
# @overload list_os_policy_assignment_reports(request, options = nil)
|
1082
|
+
# Pass arguments to `list_os_policy_assignment_reports` via a request object, either of type
|
1083
|
+
# {::Google::Cloud::OsConfig::V1alpha::ListOSPolicyAssignmentReportsRequest} or an equivalent Hash.
|
1084
|
+
#
|
1085
|
+
# @param request [::Google::Cloud::OsConfig::V1alpha::ListOSPolicyAssignmentReportsRequest, ::Hash]
|
1086
|
+
# A request object representing the call parameters. Required. To specify no
|
1087
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1088
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1089
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1090
|
+
#
|
1091
|
+
# @overload list_os_policy_assignment_reports(parent: nil, page_size: nil, filter: nil, page_token: nil)
|
1092
|
+
# Pass arguments to `list_os_policy_assignment_reports` via keyword arguments. Note that at
|
1093
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1094
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1095
|
+
#
|
1096
|
+
# @param parent [::String]
|
1097
|
+
# Required. The parent resource name.
|
1098
|
+
#
|
1099
|
+
# Format:
|
1100
|
+
# `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports`
|
1101
|
+
#
|
1102
|
+
# For `{project}`, either `project-number` or `project-id` can be provided.
|
1103
|
+
# For `{instance}`, either `instance-name`, `instance-id`, or `-` can be
|
1104
|
+
# provided. If '-' is provided, the response will include
|
1105
|
+
# OSPolicyAssignmentReports for all instances in the project/location.
|
1106
|
+
# For `{assignment}`, either `assignment-id` or `-` can be provided. If '-'
|
1107
|
+
# is provided, the response will include OSPolicyAssignmentReports for all
|
1108
|
+
# OSPolicyAssignments in the project/location.
|
1109
|
+
# Either \\{instance} or \\{assignment} must be `-`.
|
1110
|
+
#
|
1111
|
+
# For example:
|
1112
|
+
# `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports`
|
1113
|
+
# returns all reports for the instance
|
1114
|
+
# `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports`
|
1115
|
+
# returns all the reports for the given assignment across all instances.
|
1116
|
+
# `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports`
|
1117
|
+
# returns all the reports for all assignments across all instances.
|
1118
|
+
# @param page_size [::Integer]
|
1119
|
+
# The maximum number of results to return.
|
1120
|
+
# @param filter [::String]
|
1121
|
+
# If provided, this field specifies the criteria that must be met by the
|
1122
|
+
# `OSPolicyAssignmentReport` API resource that is included in the response.
|
1123
|
+
# @param page_token [::String]
|
1124
|
+
# A pagination token returned from a previous call to the
|
1125
|
+
# `ListOSPolicyAssignmentReports` method that indicates where this listing
|
1126
|
+
# should continue from.
|
1127
|
+
#
|
1128
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1129
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignmentReport>]
|
1130
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1131
|
+
#
|
1132
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignmentReport>]
|
1133
|
+
#
|
1134
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1135
|
+
#
|
1136
|
+
# @example Basic example
|
1137
|
+
# require "google/cloud/os_config/v1alpha"
|
1138
|
+
#
|
1139
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1140
|
+
# client = Google::Cloud::OsConfig::V1alpha::OsConfigZonalService::Client.new
|
1141
|
+
#
|
1142
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1143
|
+
# request = Google::Cloud::OsConfig::V1alpha::ListOSPolicyAssignmentReportsRequest.new
|
1144
|
+
#
|
1145
|
+
# # Call the list_os_policy_assignment_reports method.
|
1146
|
+
# result = client.list_os_policy_assignment_reports request
|
1147
|
+
#
|
1148
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
1149
|
+
# # iterate over all elements by calling #each, and the enumerable
|
1150
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
1151
|
+
# # methods are also available for managing paging directly.
|
1152
|
+
# result.each do |response|
|
1153
|
+
# # Each element is of type ::Google::Cloud::OsConfig::V1alpha::OSPolicyAssignmentReport.
|
1154
|
+
# p response
|
1155
|
+
# end
|
1156
|
+
#
|
1157
|
+
def list_os_policy_assignment_reports request, options = nil
|
1158
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1159
|
+
|
1160
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::OsConfig::V1alpha::ListOSPolicyAssignmentReportsRequest
|
1161
|
+
|
1162
|
+
# Converts hash and nil to an options object
|
1163
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1164
|
+
|
1165
|
+
# Customize the options with defaults
|
1166
|
+
metadata = @config.rpcs.list_os_policy_assignment_reports.metadata.to_h
|
1167
|
+
|
1168
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
1169
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1170
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1171
|
+
gapic_version: ::Google::Cloud::OsConfig::V1alpha::VERSION
|
1172
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1173
|
+
|
1174
|
+
header_params = {}
|
1175
|
+
if request.parent
|
1176
|
+
header_params["parent"] = request.parent
|
1177
|
+
end
|
1178
|
+
|
1179
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1180
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1181
|
+
|
1182
|
+
options.apply_defaults timeout: @config.rpcs.list_os_policy_assignment_reports.timeout,
|
1183
|
+
metadata: metadata,
|
1184
|
+
retry_policy: @config.rpcs.list_os_policy_assignment_reports.retry_policy
|
1185
|
+
|
1186
|
+
options.apply_defaults timeout: @config.timeout,
|
1187
|
+
metadata: @config.metadata,
|
1188
|
+
retry_policy: @config.retry_policy
|
1189
|
+
|
1190
|
+
@os_config_zonal_service_stub.call_rpc :list_os_policy_assignment_reports, request, options: options do |response, operation|
|
1191
|
+
response = ::Gapic::PagedEnumerable.new @os_config_zonal_service_stub, :list_os_policy_assignment_reports, request, response, operation, options
|
1192
|
+
yield response, operation if block_given?
|
1193
|
+
return response
|
1194
|
+
end
|
1195
|
+
rescue ::GRPC::BadStatus => e
|
1196
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1197
|
+
end
|
1198
|
+
|
978
1199
|
##
|
979
1200
|
# Get inventory data for the specified VM instance. If the VM has no
|
980
1201
|
# associated inventory, the message `NOT_FOUND` is returned.
|
@@ -1092,11 +1313,9 @@ module Google
|
|
1092
1313
|
# @param parent [::String]
|
1093
1314
|
# Required. The parent resource name.
|
1094
1315
|
#
|
1095
|
-
# Format: `projects/{project}/locations/{location}/instances
|
1316
|
+
# Format: `projects/{project}/locations/{location}/instances/-`
|
1096
1317
|
#
|
1097
|
-
# For `{project}`, either `project-number` or `project-id` can be
|
1098
|
-
# provided. For `{instance}`, only hyphen or dash character is supported to
|
1099
|
-
# list inventories across VMs.
|
1318
|
+
# For `{project}`, either `project-number` or `project-id` can be provided.
|
1100
1319
|
# @param view [::Google::Cloud::OsConfig::V1alpha::InventoryView]
|
1101
1320
|
# Inventory view indicating what information should be included in the
|
1102
1321
|
# inventory resource. If unspecified, the default view is BASIC.
|
@@ -1295,11 +1514,9 @@ module Google
|
|
1295
1514
|
# @param parent [::String]
|
1296
1515
|
# Required. The parent resource name.
|
1297
1516
|
#
|
1298
|
-
# Format: `projects/{project}/locations/{location}/instances
|
1517
|
+
# Format: `projects/{project}/locations/{location}/instances/-`
|
1299
1518
|
#
|
1300
1519
|
# For `{project}`, either `project-number` or `project-id` can be provided.
|
1301
|
-
# For `{instance}`, only `-` character is supported to list vulnerability
|
1302
|
-
# reports across VMs.
|
1303
1520
|
# @param page_size [::Integer]
|
1304
1521
|
# The maximum number of results to return.
|
1305
1522
|
# @param page_token [::String]
|
@@ -1557,6 +1774,16 @@ module Google
|
|
1557
1774
|
#
|
1558
1775
|
attr_reader :list_instance_os_policies_compliances
|
1559
1776
|
##
|
1777
|
+
# RPC-specific configuration for `get_os_policy_assignment_report`
|
1778
|
+
# @return [::Gapic::Config::Method]
|
1779
|
+
#
|
1780
|
+
attr_reader :get_os_policy_assignment_report
|
1781
|
+
##
|
1782
|
+
# RPC-specific configuration for `list_os_policy_assignment_reports`
|
1783
|
+
# @return [::Gapic::Config::Method]
|
1784
|
+
#
|
1785
|
+
attr_reader :list_os_policy_assignment_reports
|
1786
|
+
##
|
1560
1787
|
# RPC-specific configuration for `get_inventory`
|
1561
1788
|
# @return [::Gapic::Config::Method]
|
1562
1789
|
#
|
@@ -1595,6 +1822,10 @@ module Google
|
|
1595
1822
|
@get_instance_os_policies_compliance = ::Gapic::Config::Method.new get_instance_os_policies_compliance_config
|
1596
1823
|
list_instance_os_policies_compliances_config = parent_rpcs.list_instance_os_policies_compliances if parent_rpcs.respond_to? :list_instance_os_policies_compliances
|
1597
1824
|
@list_instance_os_policies_compliances = ::Gapic::Config::Method.new list_instance_os_policies_compliances_config
|
1825
|
+
get_os_policy_assignment_report_config = parent_rpcs.get_os_policy_assignment_report if parent_rpcs.respond_to? :get_os_policy_assignment_report
|
1826
|
+
@get_os_policy_assignment_report = ::Gapic::Config::Method.new get_os_policy_assignment_report_config
|
1827
|
+
list_os_policy_assignment_reports_config = parent_rpcs.list_os_policy_assignment_reports if parent_rpcs.respond_to? :list_os_policy_assignment_reports
|
1828
|
+
@list_os_policy_assignment_reports = ::Gapic::Config::Method.new list_os_policy_assignment_reports_config
|
1598
1829
|
get_inventory_config = parent_rpcs.get_inventory if parent_rpcs.respond_to? :get_inventory
|
1599
1830
|
@get_inventory = ::Gapic::Config::Method.new get_inventory_config
|
1600
1831
|
list_inventories_config = parent_rpcs.list_inventories if parent_rpcs.respond_to? :list_inventories
|
@@ -62,6 +62,27 @@ module Google
|
|
62
62
|
"projects/#{project}/locations/#{location}/instanceOSPoliciesCompliances/#{instance}"
|
63
63
|
end
|
64
64
|
|
65
|
+
##
|
66
|
+
# Create a fully-qualified InstanceOSPolicyAssignment resource string.
|
67
|
+
#
|
68
|
+
# The resource will be in the following format:
|
69
|
+
#
|
70
|
+
# `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}`
|
71
|
+
#
|
72
|
+
# @param project [String]
|
73
|
+
# @param location [String]
|
74
|
+
# @param instance [String]
|
75
|
+
# @param assignment [String]
|
76
|
+
#
|
77
|
+
# @return [::String]
|
78
|
+
def instance_os_policy_assignment_path project:, location:, instance:, assignment:
|
79
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
80
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
81
|
+
raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/"
|
82
|
+
|
83
|
+
"projects/#{project}/locations/#{location}/instances/#{instance}/osPolicyAssignments/#{assignment}"
|
84
|
+
end
|
85
|
+
|
65
86
|
##
|
66
87
|
# Create a fully-qualified Inventory resource string.
|
67
88
|
#
|
@@ -117,6 +138,27 @@ module Google
|
|
117
138
|
"projects/#{project}/locations/#{location}/osPolicyAssignments/#{os_policy_assignment}"
|
118
139
|
end
|
119
140
|
|
141
|
+
##
|
142
|
+
# Create a fully-qualified OSPolicyAssignmentReport resource string.
|
143
|
+
#
|
144
|
+
# The resource will be in the following format:
|
145
|
+
#
|
146
|
+
# `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report`
|
147
|
+
#
|
148
|
+
# @param project [String]
|
149
|
+
# @param location [String]
|
150
|
+
# @param instance [String]
|
151
|
+
# @param assignment [String]
|
152
|
+
#
|
153
|
+
# @return [::String]
|
154
|
+
def os_policy_assignment_report_path project:, location:, instance:, assignment:
|
155
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
156
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
157
|
+
raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/"
|
158
|
+
|
159
|
+
"projects/#{project}/locations/#{location}/instances/#{instance}/osPolicyAssignments/#{assignment}/report"
|
160
|
+
end
|
161
|
+
|
120
162
|
##
|
121
163
|
# Create a fully-qualified VulnerabilityReport resource string.
|
122
164
|
#
|
@@ -3,6 +3,8 @@
|
|
3
3
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
|
6
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
9
|
add_file("google/cloud/osconfig/v1alpha/config_common.proto", :syntax => :proto3) do
|
8
10
|
add_message "google.cloud.osconfig.v1alpha.OSPolicyResourceConfigStep" do
|
@@ -1,11 +1,13 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto
|
3
3
|
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
4
7
|
require 'google/api/field_behavior_pb'
|
5
8
|
require 'google/api/resource_pb'
|
6
9
|
require 'google/cloud/osconfig/v1alpha/config_common_pb'
|
7
10
|
require 'google/protobuf/timestamp_pb'
|
8
|
-
require 'google/protobuf'
|
9
11
|
|
10
12
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
13
|
add_file("google/cloud/osconfig/v1alpha/instance_os_policies_compliance.proto", :syntax => :proto3) do
|
@@ -1,11 +1,13 @@
|
|
1
1
|
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
2
|
# source: google/cloud/osconfig/v1alpha/inventory.proto
|
3
3
|
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
4
7
|
require 'google/api/field_behavior_pb'
|
5
8
|
require 'google/api/resource_pb'
|
6
9
|
require 'google/protobuf/timestamp_pb'
|
7
10
|
require 'google/type/date_pb'
|
8
|
-
require 'google/protobuf'
|
9
11
|
|
10
12
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
11
13
|
add_file("google/cloud/osconfig/v1alpha/inventory.proto", :syntax => :proto3) do
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/api/annotations_pb'
|
7
|
+
require 'google/api/field_behavior_pb'
|
8
|
+
require 'google/api/resource_pb'
|
9
|
+
require 'google/protobuf/timestamp_pb'
|
10
|
+
|
11
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
12
|
+
add_file("google/cloud/osconfig/v1alpha/os_policy_assignment_reports.proto", :syntax => :proto3) do
|
13
|
+
add_message "google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest" do
|
14
|
+
optional :name, :string, 1
|
15
|
+
end
|
16
|
+
add_message "google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest" do
|
17
|
+
optional :parent, :string, 1
|
18
|
+
optional :page_size, :int32, 2
|
19
|
+
optional :filter, :string, 3
|
20
|
+
optional :page_token, :string, 4
|
21
|
+
end
|
22
|
+
add_message "google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse" do
|
23
|
+
repeated :os_policy_assignment_reports, :message, 1, "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport"
|
24
|
+
optional :next_page_token, :string, 2
|
25
|
+
end
|
26
|
+
add_message "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport" do
|
27
|
+
optional :name, :string, 1
|
28
|
+
optional :instance, :string, 2
|
29
|
+
optional :os_policy_assignment, :string, 3
|
30
|
+
repeated :os_policy_compliances, :message, 4, "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance"
|
31
|
+
optional :update_time, :message, 5, "google.protobuf.Timestamp"
|
32
|
+
optional :last_run_id, :string, 6
|
33
|
+
end
|
34
|
+
add_message "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance" do
|
35
|
+
optional :os_policy_id, :string, 1
|
36
|
+
optional :compliance_state, :enum, 2, "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState"
|
37
|
+
optional :compliance_state_reason, :string, 3
|
38
|
+
repeated :os_policy_resource_compliances, :message, 4, "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance"
|
39
|
+
end
|
40
|
+
add_message "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance" do
|
41
|
+
optional :os_policy_resource_id, :string, 1
|
42
|
+
repeated :config_steps, :message, 2, "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep"
|
43
|
+
optional :compliance_state, :enum, 3, "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState"
|
44
|
+
optional :compliance_state_reason, :string, 4
|
45
|
+
oneof :output do
|
46
|
+
optional :exec_resource_output, :message, 5, "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
add_message "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep" do
|
50
|
+
optional :type, :enum, 1, "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type"
|
51
|
+
optional :error_message, :string, 2
|
52
|
+
end
|
53
|
+
add_enum "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type" do
|
54
|
+
value :TYPE_UNSPECIFIED, 0
|
55
|
+
value :VALIDATION, 1
|
56
|
+
value :DESIRED_STATE_CHECK, 2
|
57
|
+
value :DESIRED_STATE_ENFORCEMENT, 3
|
58
|
+
value :DESIRED_STATE_CHECK_POST_ENFORCEMENT, 4
|
59
|
+
end
|
60
|
+
add_message "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput" do
|
61
|
+
optional :enforcement_output, :bytes, 2
|
62
|
+
end
|
63
|
+
add_enum "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState" do
|
64
|
+
value :UNKNOWN, 0
|
65
|
+
value :COMPLIANT, 1
|
66
|
+
value :NON_COMPLIANT, 2
|
67
|
+
end
|
68
|
+
add_enum "google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState" do
|
69
|
+
value :UNKNOWN, 0
|
70
|
+
value :COMPLIANT, 1
|
71
|
+
value :NON_COMPLIANT, 2
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
module Google
|
77
|
+
module Cloud
|
78
|
+
module OsConfig
|
79
|
+
module V1alpha
|
80
|
+
GetOSPolicyAssignmentReportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1alpha.GetOSPolicyAssignmentReportRequest").msgclass
|
81
|
+
ListOSPolicyAssignmentReportsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsRequest").msgclass
|
82
|
+
ListOSPolicyAssignmentReportsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1alpha.ListOSPolicyAssignmentReportsResponse").msgclass
|
83
|
+
OSPolicyAssignmentReport = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport").msgclass
|
84
|
+
OSPolicyAssignmentReport::OSPolicyCompliance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance").msgclass
|
85
|
+
OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance").msgclass
|
86
|
+
OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::OSPolicyResourceConfigStep = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep").msgclass
|
87
|
+
OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::OSPolicyResourceConfigStep::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.OSPolicyResourceConfigStep.Type").enummodule
|
88
|
+
OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::ExecResourceOutput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ExecResourceOutput").msgclass
|
89
|
+
OSPolicyAssignmentReport::OSPolicyCompliance::OSPolicyResourceCompliance::ComplianceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.OSPolicyResourceCompliance.ComplianceState").enummodule
|
90
|
+
OSPolicyAssignmentReport::OSPolicyCompliance::ComplianceState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.osconfig.v1alpha.OSPolicyAssignmentReport.OSPolicyCompliance.ComplianceState").enummodule
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|