forked from GoogleCloudPlatform/magic-modules
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapi.yaml
3083 lines (2995 loc) · 133 KB
/
api.yaml
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 2017 Google Inc.
# 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.
# TODO(nelsonjr): Make all Zone and Region resource ref
--- !ruby/object:Api::Product
name: Google Compute Engine
prefix: gcompute
base_url: https://www.googleapis.com/compute/v1/
scopes:
- https://www.googleapis.com/auth/compute
objects:
- !ruby/object:Api::Resource
name: 'Address'
kind: 'compute#address'
base_url: projects/{{project}}/regions/{{region}}/addresses
exports:
- !ruby/object:Api::Type::FetchedExternal
name: address
description: |
Represents an Address resource.
Each virtual machine instance has an ephemeral internal IP address and,
optionally, an external IP address. To communicate between instances on
the same network, you can use an instance's internal IP address. To
communicate with the Internet and instances outside of the same network,
you must specify the instance's external IP address.
Internal IP addresses are ephemeral and only belong to an instance for
the lifetime of the instance; if the instance is deleted and recreated,
the instance is assigned a new internal IP address, either by Compute
Engine or by you. External IP addresses can be either ephemeral or
static.
<%= indent(compile('templates/regional_async.yaml.erb'), 4) %>
parameters:
- !ruby/object:Api::Type::ResourceRef
name: 'region'
resource: 'Region'
imports: 'name'
description: |
URL of the region where the regional address resides.
This field is not applicable to global addresses.
required: true
properties:
- !ruby/object:Api::Type::String
name: 'address'
description: |
The static external IP address represented by this
resource. Only IPv4 is supported.
- !ruby/object:Api::Type::Time
name: 'creationTimestamp'
description: 'Creation timestamp in RFC3339 text format.'
output: true
- !ruby/object:Api::Type::String
name: 'description'
description: 'An optional description of this resource.'
- !ruby/object:Api::Type::Integer
name: 'id'
description: 'The unique identifier for the resource.'
output: true
- !ruby/object:Api::Type::String
name: 'name'
description: |
Name of the resource. The name must be 1-63 characters long, and
comply with RFC1035. Specifically, the name must be 1-63 characters
long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?
which means the first character must be a lowercase letter, and all
following characters must be a dash, lowercase letter, or digit,
except the last character, which cannot be a dash.
# TODO(alexstephen): Add in status with exclude attribute. What does this
# mean?
- !ruby/object:Api::Type::Array
name: 'users'
description: 'The URLs of the resources that are using this address.'
item_type: Api::Type::String
output: true
- !ruby/object:Api::Resource
name: 'BackendBucket'
kind: 'compute#backendBucket'
base_url: projects/{{project}}/global/backendBuckets
exports:
- !ruby/object:Api::Type::SelfLink
name: 'selfLink'
description: |
Backend buckets allow you to use Google Cloud Storage buckets with HTTP(S)
load balancing.
An HTTP(S) load balancing can direct traffic to specified URLs to a
backend bucket rather than a backend service. It can send requests for
static content to a Cloud Storage bucket and requests for dynamic content
a virtual machine instance.
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Using a Cloud Storage bucket as a load balancer backend': 'https://cloud.google.com/compute/docs/load-balancing/http/backend-bucket'
api: 'https://cloud.google.com/compute/docs/reference/latest/backendBuckets'
<%= indent(compile('templates/global_async.yaml.erb'), 4) %>
properties:
- !ruby/object:Api::Type::String
name: 'bucketName'
description: 'Cloud Storage bucket name.'
required: true
- !ruby/object:Api::Type::Time
name: 'creationTimestamp'
description: 'Creation timestamp in RFC3339 text format.'
output: true
- !ruby/object:Api::Type::String
name: 'description'
description: |
An optional textual description of the resource; provided by the
client when the resource is created.
- !ruby/object:Api::Type::Boolean
name: 'enableCdn'
description: 'If true, enable Cloud CDN for this BackendBucket.'
- !ruby/object:Api::Type::Integer
name: 'id'
description: 'Unique identifier for the resource.'
output: true
- !ruby/object:Api::Type::String
name: 'name'
description: |
Name of the resource. Provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and
match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
the first character must be a lowercase letter, and all following
characters must be a dash, lowercase letter, or digit, except the
last character, which cannot be a dash.
input: true
required: true
- !ruby/object:Api::Resource
name: 'BackendService'
kind: 'compute#backendService'
base_url: projects/{{project}}/global/backendServices
exports:
- !ruby/object:Api::Type::SelfLink
name: 'selfLink'
description: |
Creates a BackendService resource in the specified project using the data
included in the request.
<%= indent(compile('templates/global_async.yaml.erb'), 4) %>
properties:
- !ruby/object:Api::Type::Integer
name: 'affinityCookieTtlSec'
description: |
Lifetime of cookies in seconds if session_affinity is
GENERATED_COOKIE. If set to 0, the cookie is non-persistent and lasts
only until the end of the browser session (or equivalent). The
maximum allowed value for TTL is one day.
When the load balancing scheme is INTERNAL, this field is not used.
- !ruby/object:Api::Type::Array
name: 'backends'
description: |
The list of backends that serve this BackendService.
item_type: !ruby/object:Api::Type::NestedObject
properties:
- !ruby/object:Api::Type::Enum
name: 'balancingMode'
description: |
Specifies the balancing mode for this backend.
For global HTTP(S) or TCP/SSL load balancing, the default is
UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S))
and CONNECTION (for TCP/SSL).
This cannot be used for internal load balancing.
values:
- :UTILIZATION
- :RATE
- :CONNECTION
- !ruby/object:Api::Type::Double
name: 'capacityScaler'
description: |
A multiplier applied to the group's maximum servicing capacity
(based on UTILIZATION, RATE or CONNECTION).
Default value is 1, which means the group will serve up to 100%
of its configured capacity (depending on balancingMode). A
setting of 0 means the group is completely drained, offering
0% of its available Capacity. Valid range is [0.0,1.0].
This cannot be used for internal load balancing.
- !ruby/object:Api::Type::String
name: 'description'
description: |
An optional description of this resource.
Provide this property when you create the resource.
- !ruby/object:Api::Type::ResourceRef
name: 'group'
resource: 'InstanceGroup'
imports: 'selfLink'
description: |
This instance group defines the list of instances that serve
traffic. Member virtual machine instances from each instance
group must live in the same zone as the instance group itself.
No two backends in a backend service are allowed to use same
Instance Group resource.
When the BackendService has load balancing scheme INTERNAL, the
instance group must be in a zone within the same region as the
BackendService.
- !ruby/object:Api::Type::Integer
name: 'maxConnections'
description: |
The max number of simultaneous connections for the group. Can
be used with either CONNECTION or UTILIZATION balancing modes.
For CONNECTION mode, either maxConnections or
maxConnectionsPerInstance must be set.
This cannot be used for internal load balancing.
- !ruby/object:Api::Type::Integer
name: 'maxConnectionsPerInstance'
description: |
The max number of simultaneous connections that a single
backend instance can handle. This is used to calculate the
capacity of the group. Can be used in either CONNECTION or
UTILIZATION balancing modes.
For CONNECTION mode, either maxConnections or
maxConnectionsPerInstance must be set.
This cannot be used for internal load balancing.
- !ruby/object:Api::Type::Integer
name: 'maxRate'
description: |
The max requests per second (RPS) of the group.
Can be used with either RATE or UTILIZATION balancing modes,
but required if RATE mode. For RATE mode, either maxRate or
maxRatePerInstance must be set.
This cannot be used for internal load balancing.
- !ruby/object:Api::Type::Double
name: 'maxRatePerInstance'
description: |
The max requests per second (RPS) that a single backend
instance can handle. This is used to calculate the capacity of
the group. Can be used in either balancing mode. For RATE mode,
either maxRate or maxRatePerInstance must be set.
This cannot be used for internal load balancing.
- !ruby/object:Api::Type::Double
name: 'maxUtilization'
description: |
Used when balancingMode is UTILIZATION. This ratio defines the
CPU utilization target for the group. The default is 0.8. Valid
range is [0.0, 1.0].
This cannot be used for internal load balancing.
- !ruby/object:Api::Type::NestedObject
name: 'cdnPolicy'
description: 'Cloud CDN configuration for this BackendService.'
properties:
- !ruby/object:Api::Type::NestedObject
name: 'cacheKeyPolicy'
description: 'The CacheKeyPolicy for this CdnPolicy.'
properties:
- !ruby/object:Api::Type::Boolean
name: 'includeHost'
description: |
If true requests to different hosts will be cached separately.
- !ruby/object:Api::Type::Boolean
name: 'includeProtocol'
description: |
If true, http and https requests will be cached separately.
- !ruby/object:Api::Type::Boolean
name: 'includeQueryString'
description: |
If true, include query string parameters in the cache key
according to query_string_whitelist and
query_string_blacklist. If neither is set, the entire query
string will be included.
If false, the query string will be excluded from the cache
key entirely.
- !ruby/object:Api::Type::Array
name: 'queryStringBlacklist'
description: |
Names of query string parameters to exclude in cache keys.
All other parameters will be included. Either specify
query_string_whitelist or query_string_blacklist, not both.
'&' and '=' will be percent encoded and not treated as
delimiters.
item_type: Api::Type::String
- !ruby/object:Api::Type::Array
name: 'queryStringWhitelist'
description: |
Names of query string parameters to include in cache keys.
All other parameters will be excluded. Either specify
query_string_whitelist or query_string_blacklist, not both.
'&' and '=' will be percent encoded and not treated as
delimiters.
item_type: Api::Type::String
- !ruby/object:Api::Type::NestedObject
name: 'connectionDraining'
description: 'Settings for connection draining'
properties:
- !ruby/object:Api::Type::Integer
name: 'drainingTimeoutSec'
description: |
Time for which instance will be drained (not accept new
connections, but still work to finish started).
- !ruby/object:Api::Type::Time
name: 'creationTimestamp'
description: 'Creation timestamp in RFC3339 text format.'
output: true
- !ruby/object:Api::Type::String
name: 'description'
description: 'An optional description of this resource.'
- !ruby/object:Api::Type::Boolean
name: 'enableCDN'
description: |
If true, enable Cloud CDN for this BackendService.
When the load balancing scheme is INTERNAL, this field is not used.
# 'fingerprint' is not suitable for resource convergence.
# TODO(nelsonjr): Limitation: healthChecks can point to various distinct
# object types and there's no way to differentiate them right now.
# Investigate if there is a way to enforce this on the client side as it
# depends on the value of load balancing being internal or external.
# TODO(nelsonjr): Make 'healthChecks' into a single object as the API
# cannot take 2+ anyway.
- !ruby/object:Api::Type::Array
name: 'healthChecks'
description: |
The list of URLs to the HttpHealthCheck or HttpsHealthCheck resource
for health checking this BackendService. Currently at most one health
check can be specified, and a health check is required.
For internal load balancing, a URL to a HealthCheck resource must be
specified instead.
item_type: Api::Type::String
- !ruby/object:Api::Type::Integer
name: 'id'
description: 'The unique identifier for the resource.'
output: true
# 'loadBalancingScheme' is undefined: string? enum? ref? http://b/63215956
# | - !ruby/object:Api::Type::???
# | name: 'loadBalancingScheme'
- !ruby/object:Api::Type::String
name: 'name'
description: |
Name of the resource. Provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and match
the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the
first character must be a lowercase letter, and all following
characters must be a dash, lowercase letter, or digit, except the last
character, which cannot be a dash.
# 'port' is deprecated
- !ruby/object:Api::Type::String
name: 'portName'
description: |
Name of backend port. The same name should appear in the instance
groups referenced by this service. Required when the load balancing
scheme is EXTERNAL.
When the load balancing scheme is INTERNAL, this field is not used.
- !ruby/object:Api::Type::Enum
name: 'protocol'
description: |
The protocol this BackendService uses to communicate with backends.
Possible values are HTTP, HTTPS, TCP, and SSL. The default is HTTP.
For internal load balancing, the possible values are TCP and UDP, and
the default is TCP.
values:
- :HTTP
- :HTTPS
- :TCP
- :SSL
- !ruby/object:Api::Type::ResourceRef
name: 'region'
resource: 'Region'
imports: 'selfLink'
description: |
The region where the regional backend service resides.
This field is not applicable to global backend services.
- !ruby/object:Api::Type::Enum
name: 'sessionAffinity'
description: |
Type of session affinity to use. The default is NONE.
When the load balancing scheme is EXTERNAL, can be NONE, CLIENT_IP, or
GENERATED_COOKIE.
When the load balancing scheme is INTERNAL, can be NONE, CLIENT_IP,
CLIENT_IP_PROTO, or CLIENT_IP_PORT_PROTO.
When the protocol is UDP, this field is not used.
values:
- :NONE
- :CLIENT_IP
- :GENERATED_COOKIE
- :CLIENT_IP_PROTO
- :CLIENT_IP_PORT_PROTO
- !ruby/object:Api::Type::Integer
name: 'timeoutSec'
description: |
How many seconds to wait for the backend before considering it a
failed request. Default is 30 seconds. Valid range is [1, 86400].
- !ruby/object:Api::Resource
name: 'DiskType'
kind: 'compute#diskType'
base_url: projects/{{project}}/zones/{{zone}}/diskTypes
# TODO(nelsonjr): Search all documentation for references of using URL (like
# the description below) and replace with the proper reference to the
# corresponding type.
description: |
Represents a DiskType resource. A DiskType resource represents the type
of disk to use, such as a pd-ssd or pd-standard. To reference a disk
type, use the disk type's full or partial URL.
# TODO(nelsonjr): Temporarily make DiskType virtual so no tests gets
# triggered for create. Implement support for read only objects, and delete
# the virtual tag
# | readonly: true
virtual: true
exports:
- !ruby/object:Api::Type::SelfLink
name: 'selfLink'
parameters:
- !ruby/object:Api::Type::ResourceRef
name: 'zone'
resource: 'Zone'
imports: 'name'
description: 'A reference to the zone where the disk type resides.'
required: true
properties:
- !ruby/object:Api::Type::Time
name: 'creationTimestamp'
description: 'Creation timestamp in RFC3339 text format.'
output: true
- !ruby/object:Api::Type::Integer
name: 'defaultDiskSizeGb'
description: 'Server-defined default disk size in GB.'
output: true
- !ruby/object:Api::Type::Time
name: 'deprecated.deleted'
description: |
An optional RFC3339 timestamp on or after which the deprecation state
of this resource will be changed to DELETED.
output: true
- !ruby/object:Api::Type::Time
name: 'deprecated.deprecated'
description: |
An optional RFC3339 timestamp on or after which the deprecation state
of this resource will be changed to DEPRECATED.
output: true
- !ruby/object:Api::Type::Time
name: 'deprecated.obsolete'
description: |
An optional RFC3339 timestamp on or after which the deprecation state
of this resource will be changed to OBSOLETE.
output: true
- !ruby/object:Api::Type::String
name: 'deprecated.replacement'
description: |
The URL of the suggested replacement for a deprecated resource. The
suggested replacement resource must be the same kind of resource as
the deprecated resource.
output: true
- !ruby/object:Api::Type::Enum
name: 'deprecated.state'
description: |
The deprecation state of this resource. This can be DEPRECATED,
OBSOLETE, or DELETED. Operations which create a new resource using a
DEPRECATED resource will return successfully, but with a warning
indicating the deprecated resource and recommending its replacement.
Operations which use OBSOLETE or DELETED resources will be rejected
and result in an error.
values:
- :DEPRECATED
- :OBSOLETE
- :DELETED
output: true
- !ruby/object:Api::Type::String
name: 'description'
description: 'An optional description of this resource.'
output: true
- !ruby/object:Api::Type::Integer
name: 'id'
description: 'The unique identifier for the resource.'
output: true
- !ruby/object:Api::Type::String
name: 'name'
description: 'Name of the resource.'
- !ruby/object:Api::Type::String
name: 'validDiskSize'
description: |
An optional textual description of the valid disk size, such as
"10GB-10TB".
output: true
- !ruby/object:Api::Resource
name: 'Disk'
# TODO(nelsonjr): Implement disk special actions as defined in the API:
# - resize
# - createSnapshot
# - setLabels
kind: 'compute#disk'
base_url: projects/{{project}}/zones/{{zone}}/disks
exports:
- 'name'
- !ruby/object:Api::Type::SelfLink
name: 'selfLink'
description: |
Persistent disks are durable storage devices that function similarly to
the physical disks in a desktop or a server. Compute Engine manages the
hardware behind these devices to ensure data redundancy and optimize
performance for you. Persistent disks are available as either standard
hard disk drives (HDD) or solid-state drives (SSD).
Persistent disks are located independently from your virtual machine
instances, so you can detach or move persistent disks to keep your data
even after you delete your instances. Persistent disk performance scales
automatically with size, so you can resize your existing persistent disks
or add more persistent disks to an instance to meet your performance and
storage space requirements.
Add a persistent disk to your instance when you need reliable and
affordable storage with consistent performance characteristics.
<%= indent(compile('templates/zonal_async.yaml.erb'), 4) %>
parameters:
- !ruby/object:Api::Type::ResourceRef
name: 'zone'
resource: 'Zone'
imports: 'name'
description: 'A reference to the zone where the disk resides.'
required: true
- !ruby/object:Api::Type::NestedObject
name: 'diskEncryptionKey'
description: |
Encrypts the disk using a customer-supplied encryption key.
After you encrypt a disk with a customer-supplied key, you must
provide the same key if you use the disk later (e.g. to create a disk
snapshot or an image, or to attach the disk to a virtual machine).
Customer-supplied encryption keys do not protect access to metadata of
the disk.
If you do not provide an encryption key when creating the disk, then
the disk will be encrypted using an automatically generated key and
you do not need to provide a key to use the disk later.
properties:
- !ruby/object:Api::Type::String
name: 'rawKey'
description: |
Specifies a 256-bit customer-supplied encryption key, encoded in
RFC 4648 base64 to either encrypt or decrypt this resource.
- !ruby/object:Api::Type::String
name: 'sha256'
description: |
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied
encryption key that protects this resource.
output: true
input: true
- !ruby/object:Api::Type::NestedObject
name: 'sourceImageEncryptionKey'
description: |
The customer-supplied encryption key of the source image. Required if
the source image is protected by a customer-supplied encryption key.
properties:
- !ruby/object:Api::Type::String
name: 'rawKey'
description: |
Specifies a 256-bit customer-supplied encryption key, encoded in
RFC 4648 base64 to either encrypt or decrypt this resource.
- !ruby/object:Api::Type::String
name: 'sha256'
description: |
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied
encryption key that protects this resource.
output: true
input: true
- !ruby/object:Api::Type::String
name: 'sourceImageId'
description: |
The ID value of the image used to create this disk. This value
identifies the exact image that was used to create this persistent
disk. For example, if you created the persistent disk from an image
that was later deleted and recreated under the same name, the source
image ID would identify the exact version of the image that was used.
output: true
# TODO(nelsonjr): Investigate if 'sourceSnapshot' is suitable to be a
# resource reference, as it takes 'global/' snapshots.
- !ruby/object:Api::Type::String
name: 'sourceSnapshot'
description: |
The source snapshot used to create this disk. You can provide this as
a partial or full URL to the resource. For example, the following are
valid values:
* https://www.googleapis.com/compute/v1/projects/project/global/
snapshots/snapshot
* projects/project/global/snapshots/snapshot
* global/snapshots/snapshot
- !ruby/object:Api::Type::NestedObject
name: 'sourceSnapshotEncryptionKey'
description: |
The customer-supplied encryption key of the source snapshot. Required
if the source snapshot is protected by a customer-supplied encryption
key.
properties:
- !ruby/object:Api::Type::String
name: 'rawKey'
description: |
Specifies a 256-bit customer-supplied encryption key, encoded in
RFC 4648 base64 to either encrypt or decrypt this resource.
- !ruby/object:Api::Type::String
name: 'sha256'
description: |
The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied
encryption key that protects this resource.
output: true
input: true
- !ruby/object:Api::Type::String
name: 'sourceSnapshotId'
description: |
The unique ID of the snapshot used to create this disk. This value
identifies the exact snapshot that was used to create this persistent
disk. For example, if you created the persistent disk from a snapshot
that was later deleted and recreated under the same name, the source
snapshot ID would identify the exact version of the snapshot that was
used.
output: true
properties:
- !ruby/object:Api::Type::Time
name: 'creationTimestamp'
description: 'Creation timestamp in RFC3339 text format.'
output: true
- !ruby/object:Api::Type::String
name: 'description'
description: |
An optional description of this resource. Provide this property when
you create the resource.
- !ruby/object:Api::Type::Integer
name: 'id'
description: 'The unique identifier for the resource.'
output: true
- !ruby/object:Api::Type::Time
name: 'lastAttachTimestamp'
description: 'Last attach timestamp in RFC3339 text format.'
output: true
- !ruby/object:Api::Type::Time
name: 'lastDetachTimestamp'
description: 'Last dettach timestamp in RFC3339 text format.'
output: true
- !ruby/object:Api::Type::Array
name: 'licenses'
description: 'Any applicable publicly visible licenses.'
item_type: Api::Type::String
- !ruby/object:Api::Type::String
name: 'name'
description: |
Name of the resource. Provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and match
the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the
first character must be a lowercase letter, and all following
characters must be a dash, lowercase letter, or digit, except the last
character, which cannot be a dash.
# 'options' fields is internal use only. do not expose.
# | - !ruby/object:Api::Type::String
# | name: 'options'
# | description: 'Internal use only'
- !ruby/object:Api::Type::Integer
name: 'sizeGb'
description: |
Size of the persistent disk, specified in GB. You can specify this
field when creating a persistent disk using the sourceImage or
sourceSnapshot parameter, or specify it alone to create an empty
persistent disk.
If you specify this field along with sourceImage or sourceSnapshot,
the value of sizeGb must not be less than the size of the sourceImage
or the size of the snapshot.
- !ruby/object:Api::Type::String
name: 'sourceImage'
description: |
The source image used to create this disk. If the source image is
deleted, this field will not be set.
To create a disk with one of the public operating system images,
specify the image by its family name. For example, specify
family/debian-8 to use the latest Debian 8 image:
projects/debian-cloud/global/images/family/debian-8
Alternatively, use a specific version of a public operating system
image:
projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD
To create a disk with a private image that you created, specify the
image name in the following format:
global/images/my-private-image
You can also specify a private image by its image family, which
returns the latest version of the image in that family. Replace the
image name with family/family-name:
global/images/family/my-private-family
input: true
# TODO(nelsonjr): Make this a resource refefence
- !ruby/object:Api::Type::String
name: 'type'
description: |
URL of the disk type resource describing which disk type to use to
create the disk. Provide this when creating the disk.
output: true
- !ruby/object:Api::Type::Array
name: 'users'
description: |
Links to the users of the disk (attached instances) in form:
project/zones/zone/instances/instance
item_type: Api::Type::String
output: true
- !ruby/object:Api::Resource
name: 'Firewall'
kind: 'compute#firewall'
base_url: projects/{{project}}/global/firewalls
description: |
Each network has its own firewall controlling access to and from the
instances.
All traffic to instances, even from other instances, is blocked by the
firewall unless firewall rules are created to allow it.
The default network has automatically created firewall rules that are
shown in default firewall rules. No manually created network has
automatically created firewall rules except for a default "allow" rule for
outgoing traffic and a default "deny" for incoming traffic. For all
networks except the default network, you must create any firewall rules
you need.
<%= indent(compile('templates/global_async.yaml.erb'), 4) %>
properties:
# TODO(nelsonjr): [nice to have] Make the format here simpler to use, in
# the form of # 22/tcp, [12345-23456]/tcp. It requires a conversion
# function to the # final JSON format expected by the API for this
# proposal to work.
- !ruby/object:Api::Type::Array
name: 'allowed'
description: |
The list of ALLOW rules specified by this firewall. Each rule
specifies a protocol and port-range tuple that describes a permitted
connection.
item_type: !ruby/object:Api::Type::NestedObject
properties:
# IPProtocol has to be string, instead of Enum because user can
# specify the protocol by number as well.
- !ruby/object:Api::Type::String
name: 'ip_protocol'
description: |
The IP protocol to which this rule applies. The protocol type is
required when creating a firewall rule. This value can either be
one of the following well known protocol strings (tcp, udp,
icmp, esp, ah, sctp), or the IP protocol number.
field: 'IPProtocol'
required: true
- !ruby/object:Api::Type::Array
item_type: Api::Type::String
name: 'ports'
description: |
An optional list of ports to which this rule applies. This field
is only applicable for UDP or TCP protocol. Each entry must be
either an integer or a range. If not specified, this rule
applies to connections through any port.
Example inputs include: ["22"], ["80","443"], and
["12345-12349"].
- !ruby/object:Api::Type::Time
name: 'creationTimestamp'
description: 'Creation timestamp in RFC3339 text format.'
output: true
- !ruby/object:Api::Type::String
name: 'description'
description: |
An optional description of this resource. Provide this property when
you create the resource.
- !ruby/object:Api::Type::Integer
name: 'id'
description: 'The unique identifier for the resource.'
output: true
- !ruby/object:Api::Type::String
name: 'name'
description: |
Name of the resource. Provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and match
the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the
first character must be a lowercase letter, and all following
characters must be a dash, lowercase letter, or digit, except the last
character, which cannot be a dash.
# TODO(nelsonjr): Convert this to a ResourceRef.
- !ruby/object:Api::Type::String
name: 'network'
description: |
URL of the network resource for this firewall rule. If not specified
when creating a firewall rule, the default network is used:
global/networks/default
If you choose to specify this property, you can specify the network as
a full or partial URL. For example, the following are all valid URLs:
https://www.googleapis.com/compute/v1/projects/myproject/global/
networks/my-network
projects/myproject/global/networks/my-network
global/networks/default
- !ruby/object:Api::Type::Array
name: 'sourceRanges'
description: |
If source ranges are specified, the firewall will apply only to
traffic that has source IP address in these ranges. These ranges must
be expressed in CIDR format. One or both of sourceRanges and
sourceTags may be set. If both properties are set, the firewall will
apply to traffic that has source IP address within sourceRanges OR the
source IP that belongs to a tag listed in the sourceTags property. The
connection does not need to match both properties for the firewall to
apply. Only IPv4 is supported.
item_type: Api::Type::String
- !ruby/object:Api::Type::Array
name: 'sourceTags'
description: |
If source tags are specified, the firewall will apply only to traffic
with source IP that belongs to a tag listed in source tags. Source
tags cannot be used to control traffic to an instance's external IP
address. Because tags are associated with an instance, not an IP
address. One or both of sourceRanges and sourceTags may be set. If
both properties are set, the firewall will apply to traffic that has
source IP address within sourceRanges OR the source IP that belongs to
a tag listed in the sourceTags property. The connection does not need
to match both properties for the firewall to apply.
item_type: Api::Type::String
- !ruby/object:Api::Type::Array
name: 'targetTags'
description: |
A list of instance tags indicating sets of instances located in the
network that may make network connections as specified in allowed[].
If no targetTags are specified, the firewall rule applies to all
instances on the specified network.
item_type: Api::Type::String
- !ruby/object:Api::Resource
name: 'ForwardingRule'
kind: 'compute#forwardingRule'
base_url: projects/{{project}}/regions/{{region}}/forwardingRules
description: |
A ForwardingRule resource. A ForwardingRule resource specifies which pool
of target virtual machines to forward a packet to if it matches the given
[IPAddress, IPProtocol, portRange] tuple.
<%= indent(compile('templates/regional_async.yaml.erb'), 4) %>
parameters:
- !ruby/object:Api::Type::ResourceRef
name: 'region'
resource: 'Region'
imports: 'name'
description: |
A reference to the region where the regional forwarding rule resides.
This field is not applicable to global forwarding rules.
required: true
properties:
<%= indent(compile('products/compute/forwarding_rule_properties.yaml'), 6) %>
- !ruby/object:Api::Type::ResourceRef
name: 'target'
resource: 'TargetPool'
imports: 'selfLink'
description: |
A reference to a TargetPool resource to receive the matched traffic.
For regional forwarding rules, this target must live in the same
region as the forwarding rule. For global forwarding rules, this
target must be a global load balancing resource. The forwarded traffic
must be of a type appropriate to the target object.
This field is not used for internal load balancing.
- !ruby/object:Api::Resource
name: 'GlobalAddress'
kind: 'compute#address'
base_url: projects/{{project}}/global/addresses
description: |
Represents a Global Address resource. Global addresses are used for
HTTP(S) load balancing.
input: true
<%= indent(compile('templates/global_async.yaml.erb'), 4) %>
properties:
- !ruby/object:Api::Type::String
name: 'address'
description: |
The static external IP address represented by this resource.
output: true
- !ruby/object:Api::Type::Time
name: 'creationTimestamp'
description: 'Creation timestamp in RFC3339 text format.'
output: true
- !ruby/object:Api::Type::String
name: 'description'
description: |
An optional description of this resource.
Provide this property when you create the resource.
- !ruby/object:Api::Type::Integer
name: 'id'
description: |
The unique identifier for the resource. This identifier is defined by
the server.
output: true
- !ruby/object:Api::Type::String
name: 'name'
description: |
Name of the resource. Provided by the client when the resource is
created. The name must be 1-63 characters long, and comply with
RFC1035. Specifically, the name must be 1-63 characters long and
match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means
the first character must be a lowercase letter, and all following
characters must be a dash, lowercase letter, or digit, except the last
character, which cannot be a dash.
required: true
- !ruby/object:Api::Type::ResourceRef
name: 'region'
resource: 'Region'
imports: 'selfLink'
description: |
A reference to the region where the regional address resides. This
field is not applicable to global addresses.
output: true
# status is not useful for state convergence
# users[] is not useful for state convergence
- !ruby/object:Api::Resource
name: 'GlobalForwardingRule'
kind: 'compute#forwardingRule'
base_url: projects/{{project}}/global/forwardingRules
description: |
Represents a GlobalForwardingRule resource. Global forwarding rules are
used to forward traffic to the correct load balancer for HTTP load
balancing. Global forwarding rules can only be used for HTTP load
balancing.
For more information, see
https://cloud.google.com/compute/docs/load-balancing/http/
<%= indent(compile('templates/global_async.yaml.erb'), 4) %>
properties:
<%= indent(compile('products/compute/forwarding_rule_properties.yaml'), 6) %>
- !ruby/object:Api::Type::ResourceRef
name: 'region'
resource: 'Region'
imports: 'name'
description: |
A reference to the region where the regional forwarding rule resides.
This field is not applicable to global forwarding rules.
output: true
# TODO(nelsonjr): Create a new type, WeakResourceRef that could accept
# various different objects, instead of one, to enable these scenarios
# where a field can receive multiple types (ditto in other places, look
# for "mysterious" Api::Type::String based objects)
- !ruby/object:Api::Type::String
name: 'target'
description: |
This target must be a global load balancing resource. The forwarded
traffic must be of a type appropriate to the target object.
Valid types: HTTP_PROXY, HTTPS_PROXY, SSL_PROXY, TCP_PROXY
- !ruby/object:Api::Resource
name: 'HttpHealthCheck'
kind: 'compute#httpHealthCheck'
base_url: projects/{{project}}/global/httpHealthChecks
exports:
- !ruby/object:Api::Type::SelfLink
name: 'selfLink'
description: |
An HttpHealthCheck resource. This resource defines a template for how
individual VMs should be checked for health, via HTTP.
<%= indent(compile('templates/global_async.yaml.erb'), 4) %>
properties:
- !ruby/object:Api::Type::Integer
name: 'checkIntervalSec'
description: |
How often (in seconds) to send a health check. The default value is 5
seconds.
- !ruby/object:Api::Type::Time
name: 'creationTimestamp'
description: 'Creation timestamp in RFC3339 text format.'
output: true
- !ruby/object:Api::Type::String
name: 'description'
description: |
An optional description of this resource. Provide this property when
you create the resource.