google-api-client 0.23.6 → 0.23.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  4. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +13 -6
  5. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +1 -1
  6. data/generated/google/apis/androidmanagement_v1.rb +1 -1
  7. data/generated/google/apis/androidmanagement_v1/classes.rb +42 -0
  8. data/generated/google/apis/androidmanagement_v1/representations.rb +18 -0
  9. data/generated/google/apis/books_v1.rb +1 -1
  10. data/generated/google/apis/books_v1/classes.rb +7 -0
  11. data/generated/google/apis/books_v1/representations.rb +1 -0
  12. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  13. data/generated/google/apis/cloudiot_v1.rb +1 -1
  14. data/generated/google/apis/cloudiot_v1/service.rb +22 -24
  15. data/generated/google/apis/compute_alpha.rb +1 -1
  16. data/generated/google/apis/compute_alpha/classes.rb +696 -623
  17. data/generated/google/apis/compute_alpha/representations.rb +144 -175
  18. data/generated/google/apis/compute_alpha/service.rb +333 -187
  19. data/generated/google/apis/compute_beta.rb +1 -1
  20. data/generated/google/apis/compute_beta/classes.rb +105 -10
  21. data/generated/google/apis/compute_beta/representations.rb +37 -1
  22. data/generated/google/apis/compute_beta/service.rb +3 -2
  23. data/generated/google/apis/compute_v1.rb +1 -1
  24. data/generated/google/apis/compute_v1/classes.rb +345 -3
  25. data/generated/google/apis/compute_v1/representations.rb +133 -0
  26. data/generated/google/apis/compute_v1/service.rb +469 -2
  27. data/google-api-client.gemspec +3 -2
  28. data/lib/google/apis/version.rb +1 -1
  29. metadata +16 -2
@@ -2290,6 +2290,54 @@ module Google
2290
2290
  include Google::Apis::Core::JsonObjectSupport
2291
2291
  end
2292
2292
 
2293
+ class SecurityPolicy
2294
+ class Representation < Google::Apis::Core::JsonRepresentation; end
2295
+
2296
+ include Google::Apis::Core::JsonObjectSupport
2297
+ end
2298
+
2299
+ class SecurityPolicyList
2300
+ class Representation < Google::Apis::Core::JsonRepresentation; end
2301
+
2302
+ class Warning
2303
+ class Representation < Google::Apis::Core::JsonRepresentation; end
2304
+
2305
+ class Datum
2306
+ class Representation < Google::Apis::Core::JsonRepresentation; end
2307
+
2308
+ include Google::Apis::Core::JsonObjectSupport
2309
+ end
2310
+
2311
+ include Google::Apis::Core::JsonObjectSupport
2312
+ end
2313
+
2314
+ include Google::Apis::Core::JsonObjectSupport
2315
+ end
2316
+
2317
+ class SecurityPolicyReference
2318
+ class Representation < Google::Apis::Core::JsonRepresentation; end
2319
+
2320
+ include Google::Apis::Core::JsonObjectSupport
2321
+ end
2322
+
2323
+ class SecurityPolicyRule
2324
+ class Representation < Google::Apis::Core::JsonRepresentation; end
2325
+
2326
+ include Google::Apis::Core::JsonObjectSupport
2327
+ end
2328
+
2329
+ class SecurityPolicyRuleMatcher
2330
+ class Representation < Google::Apis::Core::JsonRepresentation; end
2331
+
2332
+ include Google::Apis::Core::JsonObjectSupport
2333
+ end
2334
+
2335
+ class SecurityPolicyRuleMatcherConfig
2336
+ class Representation < Google::Apis::Core::JsonRepresentation; end
2337
+
2338
+ include Google::Apis::Core::JsonObjectSupport
2339
+ end
2340
+
2293
2341
  class SerialPortOutput
2294
2342
  class Representation < Google::Apis::Core::JsonRepresentation; end
2295
2343
 
@@ -3350,6 +3398,7 @@ module Google
3350
3398
  class AttachedDiskInitializeParams
3351
3399
  # @private
3352
3400
  class Representation < Google::Apis::Core::JsonRepresentation
3401
+ property :description, as: 'description'
3353
3402
  property :disk_name, as: 'diskName'
3354
3403
  property :disk_size_gb, :numeric_string => true, as: 'diskSizeGb'
3355
3404
  property :disk_type, as: 'diskType'
@@ -3614,6 +3663,7 @@ module Google
3614
3663
  property :port_name, as: 'portName'
3615
3664
  property :protocol, as: 'protocol'
3616
3665
  property :region, as: 'region'
3666
+ property :security_policy, as: 'securityPolicy'
3617
3667
  property :self_link, as: 'selfLink'
3618
3668
  property :session_affinity, as: 'sessionAffinity'
3619
3669
  property :timeout_sec, as: 'timeoutSec'
@@ -4198,6 +4248,7 @@ module Google
4198
4248
  property :description, as: 'description'
4199
4249
  collection :destination_ranges, as: 'destinationRanges'
4200
4250
  property :direction, as: 'direction'
4251
+ property :disabled, as: 'disabled'
4201
4252
  property :id, :numeric_string => true, as: 'id'
4202
4253
  property :kind, as: 'kind'
4203
4254
  property :name, as: 'name'
@@ -7264,6 +7315,88 @@ module Google
7264
7315
  end
7265
7316
  end
7266
7317
 
7318
+ class SecurityPolicy
7319
+ # @private
7320
+ class Representation < Google::Apis::Core::JsonRepresentation
7321
+ property :creation_timestamp, as: 'creationTimestamp'
7322
+ property :description, as: 'description'
7323
+ property :fingerprint, :base64 => true, as: 'fingerprint'
7324
+ property :id, :numeric_string => true, as: 'id'
7325
+ property :kind, as: 'kind'
7326
+ property :name, as: 'name'
7327
+ collection :rules, as: 'rules', class: Google::Apis::ComputeV1::SecurityPolicyRule, decorator: Google::Apis::ComputeV1::SecurityPolicyRule::Representation
7328
+
7329
+ property :self_link, as: 'selfLink'
7330
+ end
7331
+ end
7332
+
7333
+ class SecurityPolicyList
7334
+ # @private
7335
+ class Representation < Google::Apis::Core::JsonRepresentation
7336
+ property :id, as: 'id'
7337
+ collection :items, as: 'items', class: Google::Apis::ComputeV1::SecurityPolicy, decorator: Google::Apis::ComputeV1::SecurityPolicy::Representation
7338
+
7339
+ property :kind, as: 'kind'
7340
+ property :next_page_token, as: 'nextPageToken'
7341
+ property :warning, as: 'warning', class: Google::Apis::ComputeV1::SecurityPolicyList::Warning, decorator: Google::Apis::ComputeV1::SecurityPolicyList::Warning::Representation
7342
+
7343
+ end
7344
+
7345
+ class Warning
7346
+ # @private
7347
+ class Representation < Google::Apis::Core::JsonRepresentation
7348
+ property :code, as: 'code'
7349
+ collection :data, as: 'data', class: Google::Apis::ComputeV1::SecurityPolicyList::Warning::Datum, decorator: Google::Apis::ComputeV1::SecurityPolicyList::Warning::Datum::Representation
7350
+
7351
+ property :message, as: 'message'
7352
+ end
7353
+
7354
+ class Datum
7355
+ # @private
7356
+ class Representation < Google::Apis::Core::JsonRepresentation
7357
+ property :key, as: 'key'
7358
+ property :value, as: 'value'
7359
+ end
7360
+ end
7361
+ end
7362
+ end
7363
+
7364
+ class SecurityPolicyReference
7365
+ # @private
7366
+ class Representation < Google::Apis::Core::JsonRepresentation
7367
+ property :security_policy, as: 'securityPolicy'
7368
+ end
7369
+ end
7370
+
7371
+ class SecurityPolicyRule
7372
+ # @private
7373
+ class Representation < Google::Apis::Core::JsonRepresentation
7374
+ property :action, as: 'action'
7375
+ property :description, as: 'description'
7376
+ property :kind, as: 'kind'
7377
+ property :match, as: 'match', class: Google::Apis::ComputeV1::SecurityPolicyRuleMatcher, decorator: Google::Apis::ComputeV1::SecurityPolicyRuleMatcher::Representation
7378
+
7379
+ property :preview, as: 'preview'
7380
+ property :priority, as: 'priority'
7381
+ end
7382
+ end
7383
+
7384
+ class SecurityPolicyRuleMatcher
7385
+ # @private
7386
+ class Representation < Google::Apis::Core::JsonRepresentation
7387
+ property :config, as: 'config', class: Google::Apis::ComputeV1::SecurityPolicyRuleMatcherConfig, decorator: Google::Apis::ComputeV1::SecurityPolicyRuleMatcherConfig::Representation
7388
+
7389
+ property :versioned_expr, as: 'versionedExpr'
7390
+ end
7391
+ end
7392
+
7393
+ class SecurityPolicyRuleMatcherConfig
7394
+ # @private
7395
+ class Representation < Google::Apis::Core::JsonRepresentation
7396
+ collection :src_ip_ranges, as: 'srcIpRanges'
7397
+ end
7398
+ end
7399
+
7267
7400
  class SerialPortOutput
7268
7401
  # @private
7269
7402
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1814,6 +1814,58 @@ module Google
1814
1814
  execute_or_queue_command(command, &block)
1815
1815
  end
1816
1816
 
1817
+ # Sets the security policy for the specified backend service.
1818
+ # @param [String] project
1819
+ # Project ID for this request.
1820
+ # @param [String] backend_service
1821
+ # Name of the BackendService resource to which the security policy should be set.
1822
+ # The name should conform to RFC1035.
1823
+ # @param [Google::Apis::ComputeV1::SecurityPolicyReference] security_policy_reference_object
1824
+ # @param [String] request_id
1825
+ # An optional request ID to identify requests. Specify a unique request ID so
1826
+ # that if you must retry your request, the server will know to ignore the
1827
+ # request if it has already been completed.
1828
+ # For example, consider a situation where you make an initial request and the
1829
+ # request times out. If you make the request again with the same request ID, the
1830
+ # server can check if original operation with the same request ID was received,
1831
+ # and if so, will ignore the second request. This prevents clients from
1832
+ # accidentally creating duplicate commitments.
1833
+ # The request ID must be a valid UUID with the exception that zero UUID is not
1834
+ # supported (00000000-0000-0000-0000-000000000000).
1835
+ # @param [String] fields
1836
+ # Selector specifying which fields to include in a partial response.
1837
+ # @param [String] quota_user
1838
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
1839
+ # characters.
1840
+ # @param [String] user_ip
1841
+ # Deprecated. Please use quotaUser instead.
1842
+ # @param [Google::Apis::RequestOptions] options
1843
+ # Request-specific options
1844
+ #
1845
+ # @yield [result, err] Result & error if block supplied
1846
+ # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object
1847
+ # @yieldparam err [StandardError] error object if request failed
1848
+ #
1849
+ # @return [Google::Apis::ComputeV1::Operation]
1850
+ #
1851
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1852
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1853
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1854
+ def set_backend_service_security_policy(project, backend_service, security_policy_reference_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
1855
+ command = make_simple_command(:post, '{project}/global/backendServices/{backendService}/setSecurityPolicy', options)
1856
+ command.request_representation = Google::Apis::ComputeV1::SecurityPolicyReference::Representation
1857
+ command.request_object = security_policy_reference_object
1858
+ command.response_representation = Google::Apis::ComputeV1::Operation::Representation
1859
+ command.response_class = Google::Apis::ComputeV1::Operation
1860
+ command.params['project'] = project unless project.nil?
1861
+ command.params['backendService'] = backend_service unless backend_service.nil?
1862
+ command.query['requestId'] = request_id unless request_id.nil?
1863
+ command.query['fields'] = fields unless fields.nil?
1864
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1865
+ command.query['userIp'] = user_ip unless user_ip.nil?
1866
+ execute_or_queue_command(command, &block)
1867
+ end
1868
+
1817
1869
  # Updates the specified BackendService resource with the data included in the
1818
1870
  # request. There are several restrictions and guidelines to keep in mind when
1819
1871
  # updating a backend service. Read Restrictions and Guidelines for more
@@ -6672,7 +6724,8 @@ module Google
6672
6724
  execute_or_queue_command(command, &block)
6673
6725
  end
6674
6726
 
6675
- # Retrieves aggregated list of instances.
6727
+ # Retrieves aggregated list of all of the instances in your project across all
6728
+ # regions and zones.
6676
6729
  # @param [String] project
6677
6730
  # Project ID for this request.
6678
6731
  # @param [String] filter
@@ -7007,7 +7060,7 @@ module Google
7007
7060
  execute_or_queue_command(command, &block)
7008
7061
  end
7009
7062
 
7010
- # Returns the specified instance's serial port output.
7063
+ # Returns the last 1 MB of serial port output from the specified instance.
7011
7064
  # @param [String] project
7012
7065
  # Project ID for this request.
7013
7066
  # @param [String] zone
@@ -14803,6 +14856,420 @@ module Google
14803
14856
  execute_or_queue_command(command, &block)
14804
14857
  end
14805
14858
 
14859
+ # Inserts a rule into a security policy.
14860
+ # @param [String] project
14861
+ # Project ID for this request.
14862
+ # @param [String] security_policy
14863
+ # Name of the security policy to update.
14864
+ # @param [Google::Apis::ComputeV1::SecurityPolicyRule] security_policy_rule_object
14865
+ # @param [String] fields
14866
+ # Selector specifying which fields to include in a partial response.
14867
+ # @param [String] quota_user
14868
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
14869
+ # characters.
14870
+ # @param [String] user_ip
14871
+ # Deprecated. Please use quotaUser instead.
14872
+ # @param [Google::Apis::RequestOptions] options
14873
+ # Request-specific options
14874
+ #
14875
+ # @yield [result, err] Result & error if block supplied
14876
+ # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object
14877
+ # @yieldparam err [StandardError] error object if request failed
14878
+ #
14879
+ # @return [Google::Apis::ComputeV1::Operation]
14880
+ #
14881
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
14882
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
14883
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
14884
+ def add_security_policy_rule(project, security_policy, security_policy_rule_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
14885
+ command = make_simple_command(:post, '{project}/global/securityPolicies/{securityPolicy}/addRule', options)
14886
+ command.request_representation = Google::Apis::ComputeV1::SecurityPolicyRule::Representation
14887
+ command.request_object = security_policy_rule_object
14888
+ command.response_representation = Google::Apis::ComputeV1::Operation::Representation
14889
+ command.response_class = Google::Apis::ComputeV1::Operation
14890
+ command.params['project'] = project unless project.nil?
14891
+ command.params['securityPolicy'] = security_policy unless security_policy.nil?
14892
+ command.query['fields'] = fields unless fields.nil?
14893
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
14894
+ command.query['userIp'] = user_ip unless user_ip.nil?
14895
+ execute_or_queue_command(command, &block)
14896
+ end
14897
+
14898
+ # Deletes the specified policy.
14899
+ # @param [String] project
14900
+ # Project ID for this request.
14901
+ # @param [String] security_policy
14902
+ # Name of the security policy to delete.
14903
+ # @param [String] request_id
14904
+ # An optional request ID to identify requests. Specify a unique request ID so
14905
+ # that if you must retry your request, the server will know to ignore the
14906
+ # request if it has already been completed.
14907
+ # For example, consider a situation where you make an initial request and the
14908
+ # request times out. If you make the request again with the same request ID, the
14909
+ # server can check if original operation with the same request ID was received,
14910
+ # and if so, will ignore the second request. This prevents clients from
14911
+ # accidentally creating duplicate commitments.
14912
+ # The request ID must be a valid UUID with the exception that zero UUID is not
14913
+ # supported (00000000-0000-0000-0000-000000000000).
14914
+ # @param [String] fields
14915
+ # Selector specifying which fields to include in a partial response.
14916
+ # @param [String] quota_user
14917
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
14918
+ # characters.
14919
+ # @param [String] user_ip
14920
+ # Deprecated. Please use quotaUser instead.
14921
+ # @param [Google::Apis::RequestOptions] options
14922
+ # Request-specific options
14923
+ #
14924
+ # @yield [result, err] Result & error if block supplied
14925
+ # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object
14926
+ # @yieldparam err [StandardError] error object if request failed
14927
+ #
14928
+ # @return [Google::Apis::ComputeV1::Operation]
14929
+ #
14930
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
14931
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
14932
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
14933
+ def delete_security_policy(project, security_policy, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
14934
+ command = make_simple_command(:delete, '{project}/global/securityPolicies/{securityPolicy}', options)
14935
+ command.response_representation = Google::Apis::ComputeV1::Operation::Representation
14936
+ command.response_class = Google::Apis::ComputeV1::Operation
14937
+ command.params['project'] = project unless project.nil?
14938
+ command.params['securityPolicy'] = security_policy unless security_policy.nil?
14939
+ command.query['requestId'] = request_id unless request_id.nil?
14940
+ command.query['fields'] = fields unless fields.nil?
14941
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
14942
+ command.query['userIp'] = user_ip unless user_ip.nil?
14943
+ execute_or_queue_command(command, &block)
14944
+ end
14945
+
14946
+ # List all of the ordered rules present in a single specified policy.
14947
+ # @param [String] project
14948
+ # Project ID for this request.
14949
+ # @param [String] security_policy
14950
+ # Name of the security policy to get.
14951
+ # @param [String] fields
14952
+ # Selector specifying which fields to include in a partial response.
14953
+ # @param [String] quota_user
14954
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
14955
+ # characters.
14956
+ # @param [String] user_ip
14957
+ # Deprecated. Please use quotaUser instead.
14958
+ # @param [Google::Apis::RequestOptions] options
14959
+ # Request-specific options
14960
+ #
14961
+ # @yield [result, err] Result & error if block supplied
14962
+ # @yieldparam result [Google::Apis::ComputeV1::SecurityPolicy] parsed result object
14963
+ # @yieldparam err [StandardError] error object if request failed
14964
+ #
14965
+ # @return [Google::Apis::ComputeV1::SecurityPolicy]
14966
+ #
14967
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
14968
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
14969
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
14970
+ def get_security_policy(project, security_policy, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
14971
+ command = make_simple_command(:get, '{project}/global/securityPolicies/{securityPolicy}', options)
14972
+ command.response_representation = Google::Apis::ComputeV1::SecurityPolicy::Representation
14973
+ command.response_class = Google::Apis::ComputeV1::SecurityPolicy
14974
+ command.params['project'] = project unless project.nil?
14975
+ command.params['securityPolicy'] = security_policy unless security_policy.nil?
14976
+ command.query['fields'] = fields unless fields.nil?
14977
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
14978
+ command.query['userIp'] = user_ip unless user_ip.nil?
14979
+ execute_or_queue_command(command, &block)
14980
+ end
14981
+
14982
+ # Gets a rule at the specified priority.
14983
+ # @param [String] project
14984
+ # Project ID for this request.
14985
+ # @param [String] security_policy
14986
+ # Name of the security policy to which the queried rule belongs.
14987
+ # @param [Fixnum] priority
14988
+ # The priority of the rule to get from the security policy.
14989
+ # @param [String] fields
14990
+ # Selector specifying which fields to include in a partial response.
14991
+ # @param [String] quota_user
14992
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
14993
+ # characters.
14994
+ # @param [String] user_ip
14995
+ # Deprecated. Please use quotaUser instead.
14996
+ # @param [Google::Apis::RequestOptions] options
14997
+ # Request-specific options
14998
+ #
14999
+ # @yield [result, err] Result & error if block supplied
15000
+ # @yieldparam result [Google::Apis::ComputeV1::SecurityPolicyRule] parsed result object
15001
+ # @yieldparam err [StandardError] error object if request failed
15002
+ #
15003
+ # @return [Google::Apis::ComputeV1::SecurityPolicyRule]
15004
+ #
15005
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
15006
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
15007
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
15008
+ def get_security_policy_rule(project, security_policy, priority: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
15009
+ command = make_simple_command(:get, '{project}/global/securityPolicies/{securityPolicy}/getRule', options)
15010
+ command.response_representation = Google::Apis::ComputeV1::SecurityPolicyRule::Representation
15011
+ command.response_class = Google::Apis::ComputeV1::SecurityPolicyRule
15012
+ command.params['project'] = project unless project.nil?
15013
+ command.params['securityPolicy'] = security_policy unless security_policy.nil?
15014
+ command.query['priority'] = priority unless priority.nil?
15015
+ command.query['fields'] = fields unless fields.nil?
15016
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
15017
+ command.query['userIp'] = user_ip unless user_ip.nil?
15018
+ execute_or_queue_command(command, &block)
15019
+ end
15020
+
15021
+ # Creates a new policy in the specified project using the data included in the
15022
+ # request.
15023
+ # @param [String] project
15024
+ # Project ID for this request.
15025
+ # @param [Google::Apis::ComputeV1::SecurityPolicy] security_policy_object
15026
+ # @param [String] request_id
15027
+ # An optional request ID to identify requests. Specify a unique request ID so
15028
+ # that if you must retry your request, the server will know to ignore the
15029
+ # request if it has already been completed.
15030
+ # For example, consider a situation where you make an initial request and the
15031
+ # request times out. If you make the request again with the same request ID, the
15032
+ # server can check if original operation with the same request ID was received,
15033
+ # and if so, will ignore the second request. This prevents clients from
15034
+ # accidentally creating duplicate commitments.
15035
+ # The request ID must be a valid UUID with the exception that zero UUID is not
15036
+ # supported (00000000-0000-0000-0000-000000000000).
15037
+ # @param [String] fields
15038
+ # Selector specifying which fields to include in a partial response.
15039
+ # @param [String] quota_user
15040
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
15041
+ # characters.
15042
+ # @param [String] user_ip
15043
+ # Deprecated. Please use quotaUser instead.
15044
+ # @param [Google::Apis::RequestOptions] options
15045
+ # Request-specific options
15046
+ #
15047
+ # @yield [result, err] Result & error if block supplied
15048
+ # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object
15049
+ # @yieldparam err [StandardError] error object if request failed
15050
+ #
15051
+ # @return [Google::Apis::ComputeV1::Operation]
15052
+ #
15053
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
15054
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
15055
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
15056
+ def insert_security_policy(project, security_policy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
15057
+ command = make_simple_command(:post, '{project}/global/securityPolicies', options)
15058
+ command.request_representation = Google::Apis::ComputeV1::SecurityPolicy::Representation
15059
+ command.request_object = security_policy_object
15060
+ command.response_representation = Google::Apis::ComputeV1::Operation::Representation
15061
+ command.response_class = Google::Apis::ComputeV1::Operation
15062
+ command.params['project'] = project unless project.nil?
15063
+ command.query['requestId'] = request_id unless request_id.nil?
15064
+ command.query['fields'] = fields unless fields.nil?
15065
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
15066
+ command.query['userIp'] = user_ip unless user_ip.nil?
15067
+ execute_or_queue_command(command, &block)
15068
+ end
15069
+
15070
+ # List all the policies that have been configured for the specified project.
15071
+ # @param [String] project
15072
+ # Project ID for this request.
15073
+ # @param [String] filter
15074
+ # A filter expression that filters resources listed in the response. The
15075
+ # expression must specify the field name, a comparison operator, and the value
15076
+ # that you want to use for filtering. The value must be a string, a number, or a
15077
+ # boolean. The comparison operator must be either =, !=, >, or <.
15078
+ # For example, if you are filtering Compute Engine instances, you can exclude
15079
+ # instances named example-instance by specifying name != example-instance.
15080
+ # You can also filter nested fields. For example, you could specify scheduling.
15081
+ # automaticRestart = false to include instances only if they are not scheduled
15082
+ # for automatic restarts. You can use filtering on nested fields to filter based
15083
+ # on resource labels.
15084
+ # To filter on multiple expressions, provide each separate expression within
15085
+ # parentheses. For example, (scheduling.automaticRestart = true) (cpuPlatform = "
15086
+ # Intel Skylake"). By default, each expression is an AND expression. However,
15087
+ # you can include AND and OR expressions explicitly. For example, (cpuPlatform =
15088
+ # "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND (scheduling.
15089
+ # automaticRestart = true).
15090
+ # @param [Fixnum] max_results
15091
+ # The maximum number of results per page that should be returned. If the number
15092
+ # of available results is larger than maxResults, Compute Engine returns a
15093
+ # nextPageToken that can be used to get the next page of results in subsequent
15094
+ # list requests. Acceptable values are 0 to 500, inclusive. (Default: 500)
15095
+ # @param [String] order_by
15096
+ # Sorts list results by a certain order. By default, results are returned in
15097
+ # alphanumerical order based on the resource name.
15098
+ # You can also sort results in descending order based on the creation timestamp
15099
+ # using orderBy="creationTimestamp desc". This sorts results based on the
15100
+ # creationTimestamp field in reverse chronological order (newest result first).
15101
+ # Use this to sort resources like operations so that the newest operation is
15102
+ # returned first.
15103
+ # Currently, only sorting by name or creationTimestamp desc is supported.
15104
+ # @param [String] page_token
15105
+ # Specifies a page token to use. Set pageToken to the nextPageToken returned by
15106
+ # a previous list request to get the next page of results.
15107
+ # @param [String] fields
15108
+ # Selector specifying which fields to include in a partial response.
15109
+ # @param [String] quota_user
15110
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
15111
+ # characters.
15112
+ # @param [String] user_ip
15113
+ # Deprecated. Please use quotaUser instead.
15114
+ # @param [Google::Apis::RequestOptions] options
15115
+ # Request-specific options
15116
+ #
15117
+ # @yield [result, err] Result & error if block supplied
15118
+ # @yieldparam result [Google::Apis::ComputeV1::SecurityPolicyList] parsed result object
15119
+ # @yieldparam err [StandardError] error object if request failed
15120
+ #
15121
+ # @return [Google::Apis::ComputeV1::SecurityPolicyList]
15122
+ #
15123
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
15124
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
15125
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
15126
+ def list_security_policies(project, filter: nil, max_results: nil, order_by: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
15127
+ command = make_simple_command(:get, '{project}/global/securityPolicies', options)
15128
+ command.response_representation = Google::Apis::ComputeV1::SecurityPolicyList::Representation
15129
+ command.response_class = Google::Apis::ComputeV1::SecurityPolicyList
15130
+ command.params['project'] = project unless project.nil?
15131
+ command.query['filter'] = filter unless filter.nil?
15132
+ command.query['maxResults'] = max_results unless max_results.nil?
15133
+ command.query['orderBy'] = order_by unless order_by.nil?
15134
+ command.query['pageToken'] = page_token unless page_token.nil?
15135
+ command.query['fields'] = fields unless fields.nil?
15136
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
15137
+ command.query['userIp'] = user_ip unless user_ip.nil?
15138
+ execute_or_queue_command(command, &block)
15139
+ end
15140
+
15141
+ # Patches the specified policy with the data included in the request.
15142
+ # @param [String] project
15143
+ # Project ID for this request.
15144
+ # @param [String] security_policy
15145
+ # Name of the security policy to update.
15146
+ # @param [Google::Apis::ComputeV1::SecurityPolicy] security_policy_object
15147
+ # @param [String] request_id
15148
+ # An optional request ID to identify requests. Specify a unique request ID so
15149
+ # that if you must retry your request, the server will know to ignore the
15150
+ # request if it has already been completed.
15151
+ # For example, consider a situation where you make an initial request and the
15152
+ # request times out. If you make the request again with the same request ID, the
15153
+ # server can check if original operation with the same request ID was received,
15154
+ # and if so, will ignore the second request. This prevents clients from
15155
+ # accidentally creating duplicate commitments.
15156
+ # The request ID must be a valid UUID with the exception that zero UUID is not
15157
+ # supported (00000000-0000-0000-0000-000000000000).
15158
+ # @param [String] fields
15159
+ # Selector specifying which fields to include in a partial response.
15160
+ # @param [String] quota_user
15161
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
15162
+ # characters.
15163
+ # @param [String] user_ip
15164
+ # Deprecated. Please use quotaUser instead.
15165
+ # @param [Google::Apis::RequestOptions] options
15166
+ # Request-specific options
15167
+ #
15168
+ # @yield [result, err] Result & error if block supplied
15169
+ # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object
15170
+ # @yieldparam err [StandardError] error object if request failed
15171
+ #
15172
+ # @return [Google::Apis::ComputeV1::Operation]
15173
+ #
15174
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
15175
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
15176
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
15177
+ def patch_security_policy(project, security_policy, security_policy_object = nil, request_id: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
15178
+ command = make_simple_command(:patch, '{project}/global/securityPolicies/{securityPolicy}', options)
15179
+ command.request_representation = Google::Apis::ComputeV1::SecurityPolicy::Representation
15180
+ command.request_object = security_policy_object
15181
+ command.response_representation = Google::Apis::ComputeV1::Operation::Representation
15182
+ command.response_class = Google::Apis::ComputeV1::Operation
15183
+ command.params['project'] = project unless project.nil?
15184
+ command.params['securityPolicy'] = security_policy unless security_policy.nil?
15185
+ command.query['requestId'] = request_id unless request_id.nil?
15186
+ command.query['fields'] = fields unless fields.nil?
15187
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
15188
+ command.query['userIp'] = user_ip unless user_ip.nil?
15189
+ execute_or_queue_command(command, &block)
15190
+ end
15191
+
15192
+ # Patches a rule at the specified priority.
15193
+ # @param [String] project
15194
+ # Project ID for this request.
15195
+ # @param [String] security_policy
15196
+ # Name of the security policy to update.
15197
+ # @param [Google::Apis::ComputeV1::SecurityPolicyRule] security_policy_rule_object
15198
+ # @param [Fixnum] priority
15199
+ # The priority of the rule to patch.
15200
+ # @param [String] fields
15201
+ # Selector specifying which fields to include in a partial response.
15202
+ # @param [String] quota_user
15203
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
15204
+ # characters.
15205
+ # @param [String] user_ip
15206
+ # Deprecated. Please use quotaUser instead.
15207
+ # @param [Google::Apis::RequestOptions] options
15208
+ # Request-specific options
15209
+ #
15210
+ # @yield [result, err] Result & error if block supplied
15211
+ # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object
15212
+ # @yieldparam err [StandardError] error object if request failed
15213
+ #
15214
+ # @return [Google::Apis::ComputeV1::Operation]
15215
+ #
15216
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
15217
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
15218
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
15219
+ def patch_security_policy_rule(project, security_policy, security_policy_rule_object = nil, priority: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
15220
+ command = make_simple_command(:post, '{project}/global/securityPolicies/{securityPolicy}/patchRule', options)
15221
+ command.request_representation = Google::Apis::ComputeV1::SecurityPolicyRule::Representation
15222
+ command.request_object = security_policy_rule_object
15223
+ command.response_representation = Google::Apis::ComputeV1::Operation::Representation
15224
+ command.response_class = Google::Apis::ComputeV1::Operation
15225
+ command.params['project'] = project unless project.nil?
15226
+ command.params['securityPolicy'] = security_policy unless security_policy.nil?
15227
+ command.query['priority'] = priority unless priority.nil?
15228
+ command.query['fields'] = fields unless fields.nil?
15229
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
15230
+ command.query['userIp'] = user_ip unless user_ip.nil?
15231
+ execute_or_queue_command(command, &block)
15232
+ end
15233
+
15234
+ # Deletes a rule at the specified priority.
15235
+ # @param [String] project
15236
+ # Project ID for this request.
15237
+ # @param [String] security_policy
15238
+ # Name of the security policy to update.
15239
+ # @param [Fixnum] priority
15240
+ # The priority of the rule to remove from the security policy.
15241
+ # @param [String] fields
15242
+ # Selector specifying which fields to include in a partial response.
15243
+ # @param [String] quota_user
15244
+ # An opaque string that represents a user for quota purposes. Must not exceed 40
15245
+ # characters.
15246
+ # @param [String] user_ip
15247
+ # Deprecated. Please use quotaUser instead.
15248
+ # @param [Google::Apis::RequestOptions] options
15249
+ # Request-specific options
15250
+ #
15251
+ # @yield [result, err] Result & error if block supplied
15252
+ # @yieldparam result [Google::Apis::ComputeV1::Operation] parsed result object
15253
+ # @yieldparam err [StandardError] error object if request failed
15254
+ #
15255
+ # @return [Google::Apis::ComputeV1::Operation]
15256
+ #
15257
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
15258
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
15259
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
15260
+ def remove_security_policy_rule(project, security_policy, priority: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
15261
+ command = make_simple_command(:post, '{project}/global/securityPolicies/{securityPolicy}/removeRule', options)
15262
+ command.response_representation = Google::Apis::ComputeV1::Operation::Representation
15263
+ command.response_class = Google::Apis::ComputeV1::Operation
15264
+ command.params['project'] = project unless project.nil?
15265
+ command.params['securityPolicy'] = security_policy unless security_policy.nil?
15266
+ command.query['priority'] = priority unless priority.nil?
15267
+ command.query['fields'] = fields unless fields.nil?
15268
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
15269
+ command.query['userIp'] = user_ip unless user_ip.nil?
15270
+ execute_or_queue_command(command, &block)
15271
+ end
15272
+
14806
15273
  # Deletes the specified Snapshot resource. Keep in mind that deleting a single
14807
15274
  # snapshot might not necessarily delete all the data on that snapshot. If any
14808
15275
  # data on the snapshot that is marked for deletion is needed for subsequent