forked from googleapis/google-api-ruby-client
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathservice.rb
More file actions
4858 lines (4750 loc) · 324 KB
/
service.rb
File metadata and controls
4858 lines (4750 loc) · 324 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module VmwareengineV1
# VMware Engine API
#
# The Google VMware Engine API lets you programmatically manage VMware
# environments.
#
# @example
# require 'google/apis/vmwareengine_v1'
#
# Vmwareengine = Google::Apis::VmwareengineV1 # Alias the module
# service = Vmwareengine::VMwareEngineService.new
#
# @see https://cloud.google.com/solutions/vmware-as-a-service
class VMwareEngineService < Google::Apis::Core::BaseService
DEFAULT_ENDPOINT_TEMPLATE = "https://vmwareengine.$UNIVERSE_DOMAIN$/"
# @return [String]
# API key. Your API key identifies your project and provides you with API access,
# quota, and reports. Required unless you provide an OAuth 2.0 token.
attr_accessor :key
# @return [String]
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
attr_accessor :quota_user
def initialize
super(DEFAULT_ENDPOINT_TEMPLATE, '',
client_name: 'google-apis-vmwareengine_v1',
client_version: Google::Apis::VmwareengineV1::GEM_VERSION)
@batch_path = 'batch'
end
# Gets information about a location.
# @param [String] name
# Resource name for the location.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::Location] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::Location]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project_location(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::VmwareengineV1::Location::Representation
command.response_class = Google::Apis::VmwareengineV1::Location
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Gets all the principals having bind permission on the intranet VPC associated
# with the consumer project granted by the Grant API. DnsBindPermission is a
# global resource and location can only be global.
# @param [String] name
# Required. The name of the resource which stores the users/service accounts
# having the permission to bind to the corresponding intranet VPC of the
# consumer project. DnsBindPermission is a global resource. Resource names are
# schemeless URIs that follow the conventions in https://cloud.google.com/apis/
# design/resource_names. For example: `projects/my-project/locations/global/
# dnsBindPermission`
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::DnsBindPermission] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::DnsBindPermission]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project_location_dns_bind_permission(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::VmwareengineV1::DnsBindPermission::Representation
command.response_class = Google::Apis::VmwareengineV1::DnsBindPermission
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists information about the supported locations for this service. This method
# can be called in two ways: * **List all public locations:** Use the path `GET /
# v1/locations`. * **List project-visible locations:** Use the path `GET /v1/
# projects/`project_id`/locations`. This may include public locations as well as
# private or other locations specifically visible to the project.
# @param [String] name
# The resource that owns the locations collection, if applicable.
# @param [Array<String>, String] extra_location_types
# Optional. Do not use this field. It is unsupported and is ignored unless
# explicitly documented otherwise. This is primarily for internal usage.
# @param [String] filter
# A filter to narrow down results to a preferred subset. The filtering language
# accepts strings like `"displayName=tokyo"`, and is documented in more detail
# in [AIP-160](https://google.aip.dev/160).
# @param [Fixnum] page_size
# The maximum number of results to return. If not set, the service selects a
# default.
# @param [String] page_token
# A page token received from the `next_page_token` field in the response. Send
# that page token to receive the subsequent page.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::ListLocationsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::ListLocationsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_project_locations(name, extra_location_types: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}/locations', options)
command.response_representation = Google::Apis::VmwareengineV1::ListLocationsResponse::Representation
command.response_class = Google::Apis::VmwareengineV1::ListLocationsResponse
command.params['name'] = name unless name.nil?
command.query['extraLocationTypes'] = extra_location_types unless extra_location_types.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a `Announcement` by its resource name.
# @param [String] name
# Required. The resource name of the announcement to retrieve. Resource names
# are schemeless URIs that follow the conventions in https://cloud.google.com/
# apis/design/resource_names. For example: `projects/my-project/locations/us-
# west1-a/announcements/announcement-uuid`
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::Announcement] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::Announcement]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project_location_announcement(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::VmwareengineV1::Announcement::Representation
command.response_class = Google::Apis::VmwareengineV1::Announcement
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists `Announcements` for a given region and project
# @param [String] parent
# Required. The resource name of the location to be queried for announcements.
# Resource names are schemeless URIs that follow the conventions in https://
# cloud.google.com/apis/design/resource_names. For example: `projects/my-project/
# locations/us-west1-a`
# @param [String] filter
# A filter expression that matches resources returned in the response. The
# expression must specify the field name, a comparison operator, and the value
# that you want to use for filtering. The value must be a string, a number, or a
# boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For example,
# if you are filtering a list of announcement runs, you can exclude the ones
# named `example-announcement` by specifying `name != "example-announcement"`.
# You can also filter nested fields. To filter on multiple expressions, provide
# each separate expression within parentheses. For example: ``` (name = "example-
# announcement") (createTime > "2021-04-12T08:15:10.40Z") ``` By default, each
# expression is an `AND` expression. However, you can include `AND` and `OR`
# expressions explicitly. For example: ``` (name = "announcement-1") AND (
# createTime > "2021-04-12T08:15:10.40Z") OR (name = "announcement-2") ```
# @param [String] order_by
# Sorts list results by a certain order. By default, returned results are
# ordered by `name` in ascending order. You can also sort results in descending
# order based on the `name` value using `orderBy="name desc"`. Currently, only
# ordering by `name` is supported.
# @param [Fixnum] page_size
# The maximum number of announcements to return in one page. The service may
# return fewer than this value. The maximum value is coerced to 1000. The
# default value of this field is 500.
# @param [String] page_token
# A page token, received from a previous `ListAnnouncements` call. Provide this
# to retrieve the subsequent page. When paginating, all other parameters
# provided to `ListAnnouncements` must match the call that provided the page
# token.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::ListAnnouncementsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::ListAnnouncementsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_project_location_announcements(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+parent}/announcements', options)
command.response_representation = Google::Apis::VmwareengineV1::ListAnnouncementsResponse::Representation
command.response_class = Google::Apis::VmwareengineV1::ListAnnouncementsResponse
command.params['parent'] = parent unless parent.nil?
command.query['filter'] = filter unless filter.nil?
command.query['orderBy'] = order_by unless order_by.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a new `Datastore` resource in a given project and location.
# @param [String] parent
# Required. The resource name of the location to create the new datastore in.
# Resource names are schemeless URIs that follow the conventions in https://
# cloud.google.com/apis/design/resource_names. For example: `projects/my-project/
# locations/us-central1`
# @param [Google::Apis::VmwareengineV1::Datastore] datastore_object
# @param [String] datastore_id
# Required. The user-provided identifier of the datastore to be created. This
# identifier must be unique among each `Datastore` within the parent and becomes
# the final token in the name URI. The identifier must meet the following
# requirements: * Only contains 1-63 alphanumeric characters and hyphens *
# Begins with an alphabetical character * Ends with a non-hyphen character * Not
# formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/
# doc/html/rfc1034) (section 3.5)
# @param [String] request_id
# Optional. The request ID must be a valid UUID with the exception that zero
# UUID is not supported (00000000-0000-0000-0000-000000000000).
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_project_location_datastore(parent, datastore_object = nil, datastore_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/datastores', options)
command.request_representation = Google::Apis::VmwareengineV1::Datastore::Representation
command.request_object = datastore_object
command.response_representation = Google::Apis::VmwareengineV1::Operation::Representation
command.response_class = Google::Apis::VmwareengineV1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['datastoreId'] = datastore_id unless datastore_id.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a `Datastore` resource. You can only delete a Datastore after all
# resources that refer to it are deleted. For example, multiple clusters of the
# same private cloud or different private clouds can refer to the same datastore.
# @param [String] name
# Required. The resource name of the Datastore to be deleted. Resource names are
# schemeless URIs that follow the conventions in https://cloud.google.com/apis/
# design/resource_names. For example: `projects/my-project/locations/us-central1/
# datastore/my-datastore`
# @param [String] etag
# Optional. Checksum used to ensure that the user-provided value is up to date
# before the server processes the request. The server compares provided checksum
# with the current checksum of the resource. If the user-provided value is out
# of date, this request returns an `ABORTED` error.
# @param [String] request_id
# Optional. The request ID must be a valid UUID with the exception that zero
# UUID is not supported (00000000-0000-0000-0000-000000000000).
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_project_location_datastore(name, etag: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/{+name}', options)
command.response_representation = Google::Apis::VmwareengineV1::Operation::Representation
command.response_class = Google::Apis::VmwareengineV1::Operation
command.params['name'] = name unless name.nil?
command.query['etag'] = etag unless etag.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a `Datastore` resource by its resource name. The resource contains
# details of the Datastore, such as its description, subnets, type, and more.
# @param [String] name
# Required. The resource name of the Datastore to retrieve. Resource names are
# schemeless URIs that follow the conventions in https://cloud.google.com/apis/
# design/resource_names. For example: `projects/my-project/locations/us-central1/
# datastores/my-datastore`
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::Datastore] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::Datastore]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project_location_datastore(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::VmwareengineV1::Datastore::Representation
command.response_class = Google::Apis::VmwareengineV1::Datastore
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists `Datastore` resources in a given project and location.
# @param [String] parent
# Required. The resource name of the location to query for Datastores. Resource
# names are schemeless URIs that follow the conventions in https://cloud.google.
# com/apis/design/resource_names. For example: `projects/my-project/locations/us-
# central1`
# @param [String] filter
# Optional. A filter expression that matches resources returned in the response.
# The expression must specify the field name, a comparison operator, and the
# value that you want to use for filtering. The value must be a string, a number,
# or a boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For
# example, if you are filtering a list of datastores, you can exclude the ones
# named `example-datastore` by specifying `name != "example-datastore"`. To
# filter on multiple expressions, provide each separate expression within
# parentheses. For example: ``` (name = "example-datastore") (createTime > "2021-
# 04-12T08:15:10.40Z") ``` By default, each expression is an `AND` expression.
# However, you can include `AND` and `OR` expressions explicitly. For example: ``
# ` (name = "example-datastore-1") AND (createTime > "2021-04-12T08:15:10.40Z")
# OR (name = "example-datastore-2") ```
# @param [String] order_by
# Optional. Sorts list results by a certain order. By default, returned results
# are ordered by `name` in ascending order. You can also sort results in
# descending order based on the `name` value using `orderBy="name desc"`.
# Currently, only ordering by `name` is supported.
# @param [Fixnum] page_size
# Optional. The maximum number of results to return in one page. The maximum
# value is coerced to 1000. The default value of this field is 500.
# @param [String] page_token
# Optional. A page token, received from a previous `ListDatastores` call.
# Provide this to retrieve the subsequent page. When paginating, all other
# parameters provided to `ListDatastores` must match the call that provided the
# page token.
# @param [String] request_id
# Optional. The request ID must be a valid UUID with the exception that zero
# UUID is not supported (00000000-0000-0000-0000-000000000000).
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::ListDatastoresResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::ListDatastoresResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_project_location_datastores(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+parent}/datastores', options)
command.response_representation = Google::Apis::VmwareengineV1::ListDatastoresResponse::Representation
command.response_class = Google::Apis::VmwareengineV1::ListDatastoresResponse
command.params['parent'] = parent unless parent.nil?
command.query['filter'] = filter unless filter.nil?
command.query['orderBy'] = order_by unless order_by.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Modifies a Datastore resource. Only fields specified in `updateMask` are
# applied.
# @param [String] name
# Output only. Identifier. The resource name of this datastore. Resource names
# are schemeless URIs that follow the conventions in https://cloud.google.com/
# apis/design/resource_names. For example: `projects/my-project/locations/us-
# central1/datastores/datastore`
# @param [Google::Apis::VmwareengineV1::Datastore] datastore_object
# @param [String] request_id
# Optional. The request ID must be a valid UUID with the exception that zero
# UUID is not supported (00000000-0000-0000-0000-000000000000).
# @param [String] update_mask
# Optional. Field mask is used to specify the fields to be overwritten in the
# Datastore resource by the update. The fields specified in the `update_mask`
# are relative to the resource, not the full request. A field will be
# overwritten if it is in the mask. If the user does not provide a mask then all
# fields will be overwritten.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_project_location_datastore(name, datastore_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1/{+name}', options)
command.request_representation = Google::Apis::VmwareengineV1::Datastore::Representation
command.request_object = datastore_object
command.response_representation = Google::Apis::VmwareengineV1::Operation::Representation
command.response_class = Google::Apis::VmwareengineV1::Operation
command.params['name'] = name unless name.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['updateMask'] = update_mask unless update_mask.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Grants the bind permission to the customer provided principal(user / service
# account) to bind their DNS zone with the intranet VPC associated with the
# project. DnsBindPermission is a global resource and location can only be
# global.
# @param [String] name
# Required. The name of the resource which stores the users/service accounts
# having the permission to bind to the corresponding intranet VPC of the
# consumer project. DnsBindPermission is a global resource. Resource names are
# schemeless URIs that follow the conventions in https://cloud.google.com/apis/
# design/resource_names. For example: `projects/my-project/locations/global/
# dnsBindPermission`
# @param [Google::Apis::VmwareengineV1::GrantDnsBindPermissionRequest] grant_dns_bind_permission_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def grant_dns_bind_permission(name, grant_dns_bind_permission_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:grant', options)
command.request_representation = Google::Apis::VmwareengineV1::GrantDnsBindPermissionRequest::Representation
command.request_object = grant_dns_bind_permission_request_object
command.response_representation = Google::Apis::VmwareengineV1::Operation::Representation
command.response_class = Google::Apis::VmwareengineV1::Operation
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Revokes the bind permission from the customer provided principal(user /
# service account) on the intranet VPC associated with the consumer project.
# DnsBindPermission is a global resource and location can only be global.
# @param [String] name
# Required. The name of the resource which stores the users/service accounts
# having the permission to bind to the corresponding intranet VPC of the
# consumer project. DnsBindPermission is a global resource. Resource names are
# schemeless URIs that follow the conventions in https://cloud.google.com/apis/
# design/resource_names. For example: `projects/my-project/locations/global/
# dnsBindPermission`
# @param [Google::Apis::VmwareengineV1::RevokeDnsBindPermissionRequest] revoke_dns_bind_permission_request_object
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def revoke_dns_bind_permission(name, revoke_dns_bind_permission_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+name}:revoke', options)
command.request_representation = Google::Apis::VmwareengineV1::RevokeDnsBindPermissionRequest::Representation
command.request_object = revoke_dns_bind_permission_request_object
command.response_representation = Google::Apis::VmwareengineV1::Operation::Representation
command.response_class = Google::Apis::VmwareengineV1::Operation
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a new network peering between the peer network and VMware Engine
# network provided in a `NetworkPeering` resource. NetworkPeering is a global
# resource and location can only be global.
# @param [String] parent
# Required. The resource name of the location to create the new network peering
# in. This value is always `global`, because `NetworkPeering` is a global
# resource. Resource names are schemeless URIs that follow the conventions in
# https://cloud.google.com/apis/design/resource_names. For example: `projects/my-
# project/locations/global`
# @param [Google::Apis::VmwareengineV1::NetworkPeering] network_peering_object
# @param [String] network_peering_id
# Required. The user-provided identifier of the new `NetworkPeering`. This
# identifier must be unique among `NetworkPeering` resources within the parent
# and becomes the final token in the name URI. The identifier must meet the
# following requirements: * Only contains 1-63 alphanumeric characters and
# hyphens * Begins with an alphabetical character * Ends with a non-hyphen
# character * Not formatted as a UUID * Complies with [RFC 1034](https://
# datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
# @param [String] request_id
# Optional. A request ID to identify requests. Specify a unique request ID so
# that if you must retry your request, the server will know to ignore the
# request if it has already been completed. The server guarantees that a request
# doesn't result in creation of duplicate commitments for at least 60 minutes.
# For example, consider a situation where you make an initial request and the
# request times out. If you make the request again with the same request ID, the
# server can check if original operation with the same request ID was received,
# and if so, will ignore the second request. This prevents clients from
# accidentally creating duplicate commitments. The request ID must be a valid
# UUID with the exception that zero UUID is not supported (00000000-0000-0000-
# 0000-000000000000).
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_project_location_network_peering(parent, network_peering_object = nil, network_peering_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/networkPeerings', options)
command.request_representation = Google::Apis::VmwareengineV1::NetworkPeering::Representation
command.request_object = network_peering_object
command.response_representation = Google::Apis::VmwareengineV1::Operation::Representation
command.response_class = Google::Apis::VmwareengineV1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['networkPeeringId'] = network_peering_id unless network_peering_id.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a `NetworkPeering` resource. When a network peering is deleted for a
# VMware Engine network, the peer network becomes inaccessible to that VMware
# Engine network. NetworkPeering is a global resource and location can only be
# global.
# @param [String] name
# Required. The resource name of the network peering to be deleted. Resource
# names are schemeless URIs that follow the conventions in https://cloud.google.
# com/apis/design/resource_names. For example: `projects/my-project/locations/
# global/networkPeerings/my-peering`
# @param [String] request_id
# Optional. A request ID to identify requests. Specify a unique request ID so
# that if you must retry your request, the server will know to ignore the
# request if it has already been completed. The server guarantees that a request
# doesn't result in creation of duplicate commitments for at least 60 minutes.
# For example, consider a situation where you make an initial request and the
# request times out. If you make the request again with the same request ID, the
# server can check if original operation with the same request ID was received,
# and if so, will ignore the second request. This prevents clients from
# accidentally creating duplicate commitments. The request ID must be a valid
# UUID with the exception that zero UUID is not supported (00000000-0000-0000-
# 0000-000000000000).
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def delete_project_location_network_peering(name, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:delete, 'v1/{+name}', options)
command.response_representation = Google::Apis::VmwareengineV1::Operation::Representation
command.response_class = Google::Apis::VmwareengineV1::Operation
command.params['name'] = name unless name.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Retrieves a `NetworkPeering` resource by its resource name. The resource
# contains details of the network peering, such as peered networks, import and
# export custom route configurations, and peering state. NetworkPeering is a
# global resource and location can only be global.
# @param [String] name
# Required. The resource name of the network peering to retrieve. Resource names
# are schemeless URIs that follow the conventions in https://cloud.google.com/
# apis/design/resource_names. For example: `projects/my-project/locations/global/
# networkPeerings/my-peering`
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::NetworkPeering] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::NetworkPeering]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def get_project_location_network_peering(name, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+name}', options)
command.response_representation = Google::Apis::VmwareengineV1::NetworkPeering::Representation
command.response_class = Google::Apis::VmwareengineV1::NetworkPeering
command.params['name'] = name unless name.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists `NetworkPeering` resources in a given project. NetworkPeering is a
# global resource and location can only be global.
# @param [String] parent
# Required. The resource name of the location (global) to query for network
# peerings. Resource names are schemeless URIs that follow the conventions in
# https://cloud.google.com/apis/design/resource_names. For example: `projects/my-
# project/locations/global`
# @param [String] filter
# A filter expression that matches resources returned in the response. The
# expression must specify the field name, a comparison operator, and the value
# that you want to use for filtering. The value must be a string, a number, or a
# boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For example,
# if you are filtering a list of network peerings, you can exclude the ones
# named `example-peering` by specifying `name != "example-peering"`. To filter
# on multiple expressions, provide each separate expression within parentheses.
# For example: ``` (name = "example-peering") (createTime > "2021-04-12T08:15:10.
# 40Z") ``` By default, each expression is an `AND` expression. However, you can
# include `AND` and `OR` expressions explicitly. For example: ``` (name = "
# example-peering-1") AND (createTime > "2021-04-12T08:15:10.40Z") OR (name = "
# example-peering-2") ```
# @param [String] order_by
# Sorts list results by a certain order. By default, returned results are
# ordered by `name` in ascending order. You can also sort results in descending
# order based on the `name` value using `orderBy="name desc"`. Currently, only
# ordering by `name` is supported.
# @param [Fixnum] page_size
# The maximum number of network peerings to return in one page. The maximum
# value is coerced to 1000. The default value of this field is 500.
# @param [String] page_token
# A page token, received from a previous `ListNetworkPeerings` call. Provide
# this to retrieve the subsequent page. When paginating, all other parameters
# provided to `ListNetworkPeerings` must match the call that provided the page
# token.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::ListNetworkPeeringsResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::ListNetworkPeeringsResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_project_location_network_peerings(parent, filter: nil, order_by: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+parent}/networkPeerings', options)
command.response_representation = Google::Apis::VmwareengineV1::ListNetworkPeeringsResponse::Representation
command.response_class = Google::Apis::VmwareengineV1::ListNetworkPeeringsResponse
command.params['parent'] = parent unless parent.nil?
command.query['filter'] = filter unless filter.nil?
command.query['orderBy'] = order_by unless order_by.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Modifies a `NetworkPeering` resource. Only the `description` field can be
# updated. Only fields specified in `updateMask` are applied. NetworkPeering is
# a global resource and location can only be global.
# @param [String] name
# Output only. Identifier. The resource name of the network peering.
# NetworkPeering is a global resource and location can only be global. Resource
# names are scheme-less URIs that follow the conventions in https://cloud.google.
# com/apis/design/resource_names. For example: `projects/my-project/locations/
# global/networkPeerings/my-peering`
# @param [Google::Apis::VmwareengineV1::NetworkPeering] network_peering_object
# @param [String] request_id
# Optional. A request ID to identify requests. Specify a unique request ID so
# that if you must retry your request, the server will know to ignore the
# request if it has already been completed. The server guarantees that a request
# doesn't result in creation of duplicate commitments for at least 60 minutes.
# For example, consider a situation where you make an initial request and the
# request times out. If you make the request again with the same request ID, the
# server can check if original operation with the same request ID was received,
# and if so, will ignore the second request. This prevents clients from
# accidentally creating duplicate commitments. The request ID must be a valid
# UUID with the exception that zero UUID is not supported (00000000-0000-0000-
# 0000-000000000000).
# @param [String] update_mask
# Required. Field mask is used to specify the fields to be overwritten in the `
# NetworkPeering` resource by the update. The fields specified in the `
# update_mask` are relative to the resource, not the full request. A field will
# be overwritten if it is in the mask. If the user does not provide a mask then
# all fields will be overwritten.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def patch_project_location_network_peering(name, network_peering_object = nil, request_id: nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:patch, 'v1/{+name}', options)
command.request_representation = Google::Apis::VmwareengineV1::NetworkPeering::Representation
command.request_object = network_peering_object
command.response_representation = Google::Apis::VmwareengineV1::Operation::Representation
command.response_class = Google::Apis::VmwareengineV1::Operation
command.params['name'] = name unless name.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['updateMask'] = update_mask unless update_mask.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Lists the network peering routes exchanged over a peering connection.
# NetworkPeering is a global resource and location can only be global.
# @param [String] parent
# Required. The resource name of the network peering to retrieve peering routes
# from. Resource names are schemeless URIs that follow the conventions in https:/
# /cloud.google.com/apis/design/resource_names. For example: `projects/my-
# project/locations/global/networkPeerings/my-peering`
# @param [String] filter
# A filter expression that matches resources returned in the response. Currently,
# only filtering on the `direction` field is supported. To return routes
# imported from the peer network, provide "direction=INCOMING". To return routes
# exported from the VMware Engine network, provide "direction=OUTGOING". Other
# filter expressions return an error.
# @param [Fixnum] page_size
# The maximum number of peering routes to return in one page. The service may
# return fewer than this value. The maximum value is coerced to 1000. The
# default value of this field is 500.
# @param [String] page_token
# A page token, received from a previous `ListPeeringRoutes` call. Provide this
# to retrieve the subsequent page. When paginating, all other parameters
# provided to `ListPeeringRoutes` must match the call that provided the page
# token.
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::ListPeeringRoutesResponse] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::ListPeeringRoutesResponse]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def list_project_location_network_peering_peering_routes(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:get, 'v1/{+parent}/peeringRoutes', options)
command.response_representation = Google::Apis::VmwareengineV1::ListPeeringRoutesResponse::Representation
command.response_class = Google::Apis::VmwareengineV1::ListPeeringRoutesResponse
command.params['parent'] = parent unless parent.nil?
command.query['filter'] = filter unless filter.nil?
command.query['pageSize'] = page_size unless page_size.nil?
command.query['pageToken'] = page_token unless page_token.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Creates a new network policy in a given VMware Engine network of a project and
# location (region). A new network policy cannot be created if another network
# policy already exists in the same scope.
# @param [String] parent
# Required. The resource name of the location (region) to create the new network
# policy in. Resource names are schemeless URIs that follow the conventions in
# https://cloud.google.com/apis/design/resource_names. For example: `projects/my-
# project/locations/us-central1`
# @param [Google::Apis::VmwareengineV1::NetworkPolicy] network_policy_object
# @param [String] network_policy_id
# Required. The user-provided identifier of the network policy to be created.
# This identifier must be unique within parent `projects/`my-project`/locations/`
# us-central1`/networkPolicies` and becomes the final token in the name URI. The
# identifier must meet the following requirements: * Only contains 1-63
# alphanumeric characters and hyphens * Begins with an alphabetical character *
# Ends with a non-hyphen character * Not formatted as a UUID * Complies with [
# RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)
# @param [String] request_id
# Optional. A request ID to identify requests. Specify a unique request ID so
# that if you must retry your request, the server will know to ignore the
# request if it has already been completed. The server guarantees that a request
# doesn't result in creation of duplicate commitments for at least 60 minutes.
# For example, consider a situation where you make an initial request and the
# request times out. If you make the request again with the same request ID, the
# server can check if original operation with the same request ID was received,
# and if so, will ignore the second request. This prevents clients from
# accidentally creating duplicate commitments. The request ID must be a valid
# UUID with the exception that zero UUID is not supported (00000000-0000-0000-
# 0000-000000000000).
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options
# Request-specific options
#
# @yield [result, err] Result & error if block supplied
# @yieldparam result [Google::Apis::VmwareengineV1::Operation] parsed result object
# @yieldparam err [StandardError] error object if request failed
#
# @return [Google::Apis::VmwareengineV1::Operation]
#
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
# @raise [Google::Apis::AuthorizationError] Authorization is required
def create_project_location_network_policy(parent, network_policy_object = nil, network_policy_id: nil, request_id: nil, fields: nil, quota_user: nil, options: nil, &block)
command = make_simple_command(:post, 'v1/{+parent}/networkPolicies', options)
command.request_representation = Google::Apis::VmwareengineV1::NetworkPolicy::Representation
command.request_object = network_policy_object
command.response_representation = Google::Apis::VmwareengineV1::Operation::Representation
command.response_class = Google::Apis::VmwareengineV1::Operation
command.params['parent'] = parent unless parent.nil?
command.query['networkPolicyId'] = network_policy_id unless network_policy_id.nil?
command.query['requestId'] = request_id unless request_id.nil?
command.query['fields'] = fields unless fields.nil?
command.query['quotaUser'] = quota_user unless quota_user.nil?
execute_or_queue_command(command, &block)
end
# Deletes a `NetworkPolicy` resource. A network policy cannot be deleted when `
# NetworkService.state` is set to `RECONCILING` for either its external IP or
# internet access service.
# @param [String] name
# Required. The resource name of the network policy to delete. Resource names
# are schemeless URIs that follow the conventions in https://cloud.google.com/
# apis/design/resource_names. For example: `projects/my-project/locations/us-
# central1/networkPolicies/my-network-policy`
# @param [String] request_id
# Optional. A request ID to identify requests. Specify a unique request ID so
# that if you must retry your request, the server will know to ignore the
# request if it has already been completed. The server guarantees that a request
# doesn't result in creation of duplicate commitments for at least 60 minutes.
# For example, consider a situation where you make an initial request and the
# request times out. If you make the request again with the same request ID, the
# server can check if original operation with the same request ID was received,
# and if so, will ignore the second request. This prevents clients from
# accidentally creating duplicate commitments. The request ID must be a valid
# UUID with the exception that zero UUID is not supported (00000000-0000-0000-
# 0000-000000000000).
# @param [String] fields
# Selector specifying which fields to include in a partial response.
# @param [String] quota_user
# Available to use for quota purposes for server-side applications. Can be any
# arbitrary string assigned to a user, but should not exceed 40 characters.
# @param [Google::Apis::RequestOptions] options