-
Notifications
You must be signed in to change notification settings - Fork 19
/
address.py
717 lines (634 loc) · 38.8 KB
/
address.py
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
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__all__ = ['AddressArgs', 'Address']
@pulumi.input_type
class AddressArgs:
def __init__(__self__, *,
address: pulumi.Input[str],
project: pulumi.Input[str],
region: pulumi.Input[str],
address_type: Optional[pulumi.Input[str]] = None,
creation_timestamp: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
ip_version: Optional[pulumi.Input[str]] = None,
kind: Optional[pulumi.Input[str]] = None,
label_fingerprint: Optional[pulumi.Input[str]] = None,
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
network: Optional[pulumi.Input[str]] = None,
network_tier: Optional[pulumi.Input[str]] = None,
prefix_length: Optional[pulumi.Input[int]] = None,
purpose: Optional[pulumi.Input[str]] = None,
self_link: Optional[pulumi.Input[str]] = None,
self_link_with_id: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
subnetwork: Optional[pulumi.Input[str]] = None,
users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
"""
The set of arguments for constructing a Address resource.
:param pulumi.Input[str] address: The static IP address represented by this resource.
:param pulumi.Input[str] region: [Output Only] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. This field is not applicable to global addresses.
:param pulumi.Input[str] address_type: The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
:param pulumi.Input[str] creation_timestamp: [Output Only] Creation timestamp in RFC3339 text format.
:param pulumi.Input[str] description: An optional description of this resource. Provide this field when you create the resource.
:param pulumi.Input[str] id: [Output Only] The unique identifier for the resource. This identifier is defined by the server.
:param pulumi.Input[str] ip_version: The IP version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.
:param pulumi.Input[str] kind: [Output Only] Type of the resource. Always compute#address for addresses.
:param pulumi.Input[str] label_fingerprint: A fingerprint for the labels being applied to this Address, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
To see the latest fingerprint, make a get() request to retrieve an Address.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
:param pulumi.Input[str] name: 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
:param pulumi.Input[str] network: The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
:param pulumi.Input[str] network_tier: This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a network load balancer.
If this field is not specified, it is assumed to be PREMIUM.
:param pulumi.Input[int] prefix_length: The prefix length if the resource represents an IP range.
:param pulumi.Input[str] purpose: The purpose of this resource, which can be one of the following values:
- `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources.
- `DNS_RESOLVER` for a DNS resolver address in a subnetwork
- `VPC_PEERING` for addresses that are reserved for VPC peer networks.
- `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.
- `IPSEC_INTERCONNECT` for addresses created from a private IP range that are reserved for a VLAN attachment in an IPsec-encrypted Cloud Interconnect configuration. These addresses are regional resources.
:param pulumi.Input[str] self_link: [Output Only] Server-defined URL for the resource.
:param pulumi.Input[str] self_link_with_id: [Output Only] Server-defined URL for this resource with the resource id.
:param pulumi.Input[str] status: [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
:param pulumi.Input[str] subnetwork: The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
:param pulumi.Input[Sequence[pulumi.Input[str]]] users: [Output Only] The URLs of the resources that are using this address.
"""
pulumi.set(__self__, "address", address)
pulumi.set(__self__, "project", project)
pulumi.set(__self__, "region", region)
if address_type is not None:
pulumi.set(__self__, "address_type", address_type)
if creation_timestamp is not None:
pulumi.set(__self__, "creation_timestamp", creation_timestamp)
if description is not None:
pulumi.set(__self__, "description", description)
if id is not None:
pulumi.set(__self__, "id", id)
if ip_version is not None:
pulumi.set(__self__, "ip_version", ip_version)
if kind is not None:
pulumi.set(__self__, "kind", kind)
if label_fingerprint is not None:
pulumi.set(__self__, "label_fingerprint", label_fingerprint)
if labels is not None:
pulumi.set(__self__, "labels", labels)
if name is not None:
pulumi.set(__self__, "name", name)
if network is not None:
pulumi.set(__self__, "network", network)
if network_tier is not None:
pulumi.set(__self__, "network_tier", network_tier)
if prefix_length is not None:
pulumi.set(__self__, "prefix_length", prefix_length)
if purpose is not None:
pulumi.set(__self__, "purpose", purpose)
if self_link is not None:
pulumi.set(__self__, "self_link", self_link)
if self_link_with_id is not None:
pulumi.set(__self__, "self_link_with_id", self_link_with_id)
if status is not None:
pulumi.set(__self__, "status", status)
if subnetwork is not None:
pulumi.set(__self__, "subnetwork", subnetwork)
if users is not None:
pulumi.set(__self__, "users", users)
@property
@pulumi.getter
def address(self) -> pulumi.Input[str]:
"""
The static IP address represented by this resource.
"""
return pulumi.get(self, "address")
@address.setter
def address(self, value: pulumi.Input[str]):
pulumi.set(self, "address", value)
@property
@pulumi.getter
def project(self) -> pulumi.Input[str]:
return pulumi.get(self, "project")
@project.setter
def project(self, value: pulumi.Input[str]):
pulumi.set(self, "project", value)
@property
@pulumi.getter
def region(self) -> pulumi.Input[str]:
"""
[Output Only] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. This field is not applicable to global addresses.
"""
return pulumi.get(self, "region")
@region.setter
def region(self, value: pulumi.Input[str]):
pulumi.set(self, "region", value)
@property
@pulumi.getter(name="addressType")
def address_type(self) -> Optional[pulumi.Input[str]]:
"""
The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
"""
return pulumi.get(self, "address_type")
@address_type.setter
def address_type(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "address_type", value)
@property
@pulumi.getter(name="creationTimestamp")
def creation_timestamp(self) -> Optional[pulumi.Input[str]]:
"""
[Output Only] Creation timestamp in RFC3339 text format.
"""
return pulumi.get(self, "creation_timestamp")
@creation_timestamp.setter
def creation_timestamp(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "creation_timestamp", value)
@property
@pulumi.getter
def description(self) -> Optional[pulumi.Input[str]]:
"""
An optional description of this resource. Provide this field when you create the resource.
"""
return pulumi.get(self, "description")
@description.setter
def description(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "description", value)
@property
@pulumi.getter
def id(self) -> Optional[pulumi.Input[str]]:
"""
[Output Only] The unique identifier for the resource. This identifier is defined by the server.
"""
return pulumi.get(self, "id")
@id.setter
def id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "id", value)
@property
@pulumi.getter(name="ipVersion")
def ip_version(self) -> Optional[pulumi.Input[str]]:
"""
The IP version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.
"""
return pulumi.get(self, "ip_version")
@ip_version.setter
def ip_version(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "ip_version", value)
@property
@pulumi.getter
def kind(self) -> Optional[pulumi.Input[str]]:
"""
[Output Only] Type of the resource. Always compute#address for addresses.
"""
return pulumi.get(self, "kind")
@kind.setter
def kind(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "kind", value)
@property
@pulumi.getter(name="labelFingerprint")
def label_fingerprint(self) -> Optional[pulumi.Input[str]]:
"""
A fingerprint for the labels being applied to this Address, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
To see the latest fingerprint, make a get() request to retrieve an Address.
"""
return pulumi.get(self, "label_fingerprint")
@label_fingerprint.setter
def label_fingerprint(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "label_fingerprint", value)
@property
@pulumi.getter
def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
"""
Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
"""
return pulumi.get(self, "labels")
@labels.setter
def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
pulumi.set(self, "labels", value)
@property
@pulumi.getter
def name(self) -> Optional[pulumi.Input[str]]:
"""
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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
"""
return pulumi.get(self, "name")
@name.setter
def name(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "name", value)
@property
@pulumi.getter
def network(self) -> Optional[pulumi.Input[str]]:
"""
The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
"""
return pulumi.get(self, "network")
@network.setter
def network(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "network", value)
@property
@pulumi.getter(name="networkTier")
def network_tier(self) -> Optional[pulumi.Input[str]]:
"""
This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a network load balancer.
If this field is not specified, it is assumed to be PREMIUM.
"""
return pulumi.get(self, "network_tier")
@network_tier.setter
def network_tier(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "network_tier", value)
@property
@pulumi.getter(name="prefixLength")
def prefix_length(self) -> Optional[pulumi.Input[int]]:
"""
The prefix length if the resource represents an IP range.
"""
return pulumi.get(self, "prefix_length")
@prefix_length.setter
def prefix_length(self, value: Optional[pulumi.Input[int]]):
pulumi.set(self, "prefix_length", value)
@property
@pulumi.getter
def purpose(self) -> Optional[pulumi.Input[str]]:
"""
The purpose of this resource, which can be one of the following values:
- `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources.
- `DNS_RESOLVER` for a DNS resolver address in a subnetwork
- `VPC_PEERING` for addresses that are reserved for VPC peer networks.
- `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.
- `IPSEC_INTERCONNECT` for addresses created from a private IP range that are reserved for a VLAN attachment in an IPsec-encrypted Cloud Interconnect configuration. These addresses are regional resources.
"""
return pulumi.get(self, "purpose")
@purpose.setter
def purpose(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "purpose", value)
@property
@pulumi.getter(name="selfLink")
def self_link(self) -> Optional[pulumi.Input[str]]:
"""
[Output Only] Server-defined URL for the resource.
"""
return pulumi.get(self, "self_link")
@self_link.setter
def self_link(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "self_link", value)
@property
@pulumi.getter(name="selfLinkWithId")
def self_link_with_id(self) -> Optional[pulumi.Input[str]]:
"""
[Output Only] Server-defined URL for this resource with the resource id.
"""
return pulumi.get(self, "self_link_with_id")
@self_link_with_id.setter
def self_link_with_id(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "self_link_with_id", value)
@property
@pulumi.getter
def status(self) -> Optional[pulumi.Input[str]]:
"""
[Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
"""
return pulumi.get(self, "status")
@status.setter
def status(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "status", value)
@property
@pulumi.getter
def subnetwork(self) -> Optional[pulumi.Input[str]]:
"""
The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
"""
return pulumi.get(self, "subnetwork")
@subnetwork.setter
def subnetwork(self, value: Optional[pulumi.Input[str]]):
pulumi.set(self, "subnetwork", value)
@property
@pulumi.getter
def users(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
"""
[Output Only] The URLs of the resources that are using this address.
"""
return pulumi.get(self, "users")
@users.setter
def users(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "users", value)
class Address(pulumi.CustomResource):
@overload
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
address: Optional[pulumi.Input[str]] = None,
address_type: Optional[pulumi.Input[str]] = None,
creation_timestamp: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
ip_version: Optional[pulumi.Input[str]] = None,
kind: Optional[pulumi.Input[str]] = None,
label_fingerprint: Optional[pulumi.Input[str]] = None,
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
network: Optional[pulumi.Input[str]] = None,
network_tier: Optional[pulumi.Input[str]] = None,
prefix_length: Optional[pulumi.Input[int]] = None,
project: Optional[pulumi.Input[str]] = None,
purpose: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
self_link: Optional[pulumi.Input[str]] = None,
self_link_with_id: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
subnetwork: Optional[pulumi.Input[str]] = None,
users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
__props__=None):
"""
Creates an address resource in the specified project by using the data included in the request.
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[str] address: The static IP address represented by this resource.
:param pulumi.Input[str] address_type: The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
:param pulumi.Input[str] creation_timestamp: [Output Only] Creation timestamp in RFC3339 text format.
:param pulumi.Input[str] description: An optional description of this resource. Provide this field when you create the resource.
:param pulumi.Input[str] id: [Output Only] The unique identifier for the resource. This identifier is defined by the server.
:param pulumi.Input[str] ip_version: The IP version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.
:param pulumi.Input[str] kind: [Output Only] Type of the resource. Always compute#address for addresses.
:param pulumi.Input[str] label_fingerprint: A fingerprint for the labels being applied to this Address, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
To see the latest fingerprint, make a get() request to retrieve an Address.
:param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
:param pulumi.Input[str] name: 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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
:param pulumi.Input[str] network: The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
:param pulumi.Input[str] network_tier: This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a network load balancer.
If this field is not specified, it is assumed to be PREMIUM.
:param pulumi.Input[int] prefix_length: The prefix length if the resource represents an IP range.
:param pulumi.Input[str] purpose: The purpose of this resource, which can be one of the following values:
- `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources.
- `DNS_RESOLVER` for a DNS resolver address in a subnetwork
- `VPC_PEERING` for addresses that are reserved for VPC peer networks.
- `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.
- `IPSEC_INTERCONNECT` for addresses created from a private IP range that are reserved for a VLAN attachment in an IPsec-encrypted Cloud Interconnect configuration. These addresses are regional resources.
:param pulumi.Input[str] region: [Output Only] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. This field is not applicable to global addresses.
:param pulumi.Input[str] self_link: [Output Only] Server-defined URL for the resource.
:param pulumi.Input[str] self_link_with_id: [Output Only] Server-defined URL for this resource with the resource id.
:param pulumi.Input[str] status: [Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
:param pulumi.Input[str] subnetwork: The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
:param pulumi.Input[Sequence[pulumi.Input[str]]] users: [Output Only] The URLs of the resources that are using this address.
"""
...
@overload
def __init__(__self__,
resource_name: str,
args: AddressArgs,
opts: Optional[pulumi.ResourceOptions] = None):
"""
Creates an address resource in the specified project by using the data included in the request.
:param str resource_name: The name of the resource.
:param AddressArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
...
def __init__(__self__, resource_name: str, *args, **kwargs):
resource_args, opts = _utilities.get_resource_args_opts(AddressArgs, pulumi.ResourceOptions, *args, **kwargs)
if resource_args is not None:
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
else:
__self__._internal_init(resource_name, *args, **kwargs)
def _internal_init(__self__,
resource_name: str,
opts: Optional[pulumi.ResourceOptions] = None,
address: Optional[pulumi.Input[str]] = None,
address_type: Optional[pulumi.Input[str]] = None,
creation_timestamp: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
ip_version: Optional[pulumi.Input[str]] = None,
kind: Optional[pulumi.Input[str]] = None,
label_fingerprint: Optional[pulumi.Input[str]] = None,
labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
network: Optional[pulumi.Input[str]] = None,
network_tier: Optional[pulumi.Input[str]] = None,
prefix_length: Optional[pulumi.Input[int]] = None,
project: Optional[pulumi.Input[str]] = None,
purpose: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
self_link: Optional[pulumi.Input[str]] = None,
self_link_with_id: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
subnetwork: Optional[pulumi.Input[str]] = None,
users: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
__props__=None):
if opts is None:
opts = pulumi.ResourceOptions()
if not isinstance(opts, pulumi.ResourceOptions):
raise TypeError('Expected resource options to be a ResourceOptions instance')
if opts.version is None:
opts.version = _utilities.get_version()
if opts.id is None:
if __props__ is not None:
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
__props__ = AddressArgs.__new__(AddressArgs)
if address is None and not opts.urn:
raise TypeError("Missing required property 'address'")
__props__.__dict__["address"] = address
__props__.__dict__["address_type"] = address_type
__props__.__dict__["creation_timestamp"] = creation_timestamp
__props__.__dict__["description"] = description
__props__.__dict__["id"] = id
__props__.__dict__["ip_version"] = ip_version
__props__.__dict__["kind"] = kind
__props__.__dict__["label_fingerprint"] = label_fingerprint
__props__.__dict__["labels"] = labels
__props__.__dict__["name"] = name
__props__.__dict__["network"] = network
__props__.__dict__["network_tier"] = network_tier
__props__.__dict__["prefix_length"] = prefix_length
if project is None and not opts.urn:
raise TypeError("Missing required property 'project'")
__props__.__dict__["project"] = project
__props__.__dict__["purpose"] = purpose
if region is None and not opts.urn:
raise TypeError("Missing required property 'region'")
__props__.__dict__["region"] = region
__props__.__dict__["self_link"] = self_link
__props__.__dict__["self_link_with_id"] = self_link_with_id
__props__.__dict__["status"] = status
__props__.__dict__["subnetwork"] = subnetwork
__props__.__dict__["users"] = users
super(Address, __self__).__init__(
'gcp-native:compute/alpha:Address',
resource_name,
__props__,
opts)
@staticmethod
def get(resource_name: str,
id: pulumi.Input[str],
opts: Optional[pulumi.ResourceOptions] = None) -> 'Address':
"""
Get an existing Address resource's state with the given name, id, and optional extra
properties used to qualify the lookup.
:param str resource_name: The unique name of the resulting resource.
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
:param pulumi.ResourceOptions opts: Options for the resource.
"""
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
__props__ = AddressArgs.__new__(AddressArgs)
__props__.__dict__["address"] = None
__props__.__dict__["address_type"] = None
__props__.__dict__["creation_timestamp"] = None
__props__.__dict__["description"] = None
__props__.__dict__["ip_version"] = None
__props__.__dict__["kind"] = None
__props__.__dict__["label_fingerprint"] = None
__props__.__dict__["labels"] = None
__props__.__dict__["name"] = None
__props__.__dict__["network"] = None
__props__.__dict__["network_tier"] = None
__props__.__dict__["prefix_length"] = None
__props__.__dict__["purpose"] = None
__props__.__dict__["region"] = None
__props__.__dict__["self_link"] = None
__props__.__dict__["self_link_with_id"] = None
__props__.__dict__["status"] = None
__props__.__dict__["subnetwork"] = None
__props__.__dict__["users"] = None
return Address(resource_name, opts=opts, __props__=__props__)
@property
@pulumi.getter
def address(self) -> pulumi.Output[str]:
"""
The static IP address represented by this resource.
"""
return pulumi.get(self, "address")
@property
@pulumi.getter(name="addressType")
def address_type(self) -> pulumi.Output[str]:
"""
The type of address to reserve, either INTERNAL or EXTERNAL. If unspecified, defaults to EXTERNAL.
"""
return pulumi.get(self, "address_type")
@property
@pulumi.getter(name="creationTimestamp")
def creation_timestamp(self) -> pulumi.Output[str]:
"""
[Output Only] Creation timestamp in RFC3339 text format.
"""
return pulumi.get(self, "creation_timestamp")
@property
@pulumi.getter
def description(self) -> pulumi.Output[str]:
"""
An optional description of this resource. Provide this field when you create the resource.
"""
return pulumi.get(self, "description")
@property
@pulumi.getter(name="ipVersion")
def ip_version(self) -> pulumi.Output[str]:
"""
The IP version that will be used by this address. Valid options are IPV4 or IPV6. This can only be specified for a global address.
"""
return pulumi.get(self, "ip_version")
@property
@pulumi.getter
def kind(self) -> pulumi.Output[str]:
"""
[Output Only] Type of the resource. Always compute#address for addresses.
"""
return pulumi.get(self, "kind")
@property
@pulumi.getter(name="labelFingerprint")
def label_fingerprint(self) -> pulumi.Output[str]:
"""
A fingerprint for the labels being applied to this Address, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet.
To see the latest fingerprint, make a get() request to retrieve an Address.
"""
return pulumi.get(self, "label_fingerprint")
@property
@pulumi.getter
def labels(self) -> pulumi.Output[Mapping[str, str]]:
"""
Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty.
"""
return pulumi.get(self, "labels")
@property
@pulumi.getter
def name(self) -> pulumi.Output[str]:
"""
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])?`. The first character must be a lowercase letter, and all following characters (except for the last character) must be a dash, lowercase letter, or digit. The last character must be a lowercase letter or digit.
"""
return pulumi.get(self, "name")
@property
@pulumi.getter
def network(self) -> pulumi.Output[str]:
"""
The URL of the network in which to reserve the address. This field can only be used with INTERNAL type with the VPC_PEERING purpose.
"""
return pulumi.get(self, "network")
@property
@pulumi.getter(name="networkTier")
def network_tier(self) -> pulumi.Output[str]:
"""
This signifies the networking tier used for configuring this address and can only take the following values: PREMIUM or STANDARD. Global forwarding rules can only be Premium Tier. Regional forwarding rules can be either Premium or Standard Tier. Standard Tier addresses applied to regional forwarding rules can be used with any external load balancer. Regional forwarding rules in Premium Tier can only be used with a network load balancer.
If this field is not specified, it is assumed to be PREMIUM.
"""
return pulumi.get(self, "network_tier")
@property
@pulumi.getter(name="prefixLength")
def prefix_length(self) -> pulumi.Output[int]:
"""
The prefix length if the resource represents an IP range.
"""
return pulumi.get(self, "prefix_length")
@property
@pulumi.getter
def purpose(self) -> pulumi.Output[str]:
"""
The purpose of this resource, which can be one of the following values:
- `GCE_ENDPOINT` for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources.
- `DNS_RESOLVER` for a DNS resolver address in a subnetwork
- `VPC_PEERING` for addresses that are reserved for VPC peer networks.
- `NAT_AUTO` for addresses that are external IP addresses automatically reserved for Cloud NAT.
- `IPSEC_INTERCONNECT` for addresses created from a private IP range that are reserved for a VLAN attachment in an IPsec-encrypted Cloud Interconnect configuration. These addresses are regional resources.
"""
return pulumi.get(self, "purpose")
@property
@pulumi.getter
def region(self) -> pulumi.Output[str]:
"""
[Output Only] The URL of the region where a regional address resides. For regional addresses, you must specify the region as a path parameter in the HTTP request URL. This field is not applicable to global addresses.
"""
return pulumi.get(self, "region")
@property
@pulumi.getter(name="selfLink")
def self_link(self) -> pulumi.Output[str]:
"""
[Output Only] Server-defined URL for the resource.
"""
return pulumi.get(self, "self_link")
@property
@pulumi.getter(name="selfLinkWithId")
def self_link_with_id(self) -> pulumi.Output[str]:
"""
[Output Only] Server-defined URL for this resource with the resource id.
"""
return pulumi.get(self, "self_link_with_id")
@property
@pulumi.getter
def status(self) -> pulumi.Output[str]:
"""
[Output Only] The status of the address, which can be one of RESERVING, RESERVED, or IN_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.
"""
return pulumi.get(self, "status")
@property
@pulumi.getter
def subnetwork(self) -> pulumi.Output[str]:
"""
The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with a GCE_ENDPOINT or DNS_RESOLVER purpose.
"""
return pulumi.get(self, "subnetwork")
@property
@pulumi.getter
def users(self) -> pulumi.Output[Sequence[str]]:
"""
[Output Only] The URLs of the resources that are using this address.
"""
return pulumi.get(self, "users")