/
getTrafficForwardingStaticIP.go
185 lines (161 loc) · 8.29 KB
/
getTrafficForwardingStaticIP.go
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
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package zia
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/zscaler/pulumi-zia/sdk/go/zia/internal"
)
// Use the **zia_traffic_forwarding_static_ip** data source to get information about all provisioned static IP addresses. This resource can then be utilized when creating a GRE Tunnel or VPN Credential resource of Type `IP`
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/zscaler/pulumi-zia/sdk/go/zia"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := zia.LookupTrafficForwardingStaticIP(ctx, &zia.LookupTrafficForwardingStaticIPArgs{
// IpAddress: pulumi.StringRef("1.1.1.1"),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
func LookupTrafficForwardingStaticIP(ctx *pulumi.Context, args *LookupTrafficForwardingStaticIPArgs, opts ...pulumi.InvokeOption) (*LookupTrafficForwardingStaticIPResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupTrafficForwardingStaticIPResult
err := ctx.Invoke("zia:index/getTrafficForwardingStaticIP:getTrafficForwardingStaticIP", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getTrafficForwardingStaticIP.
type LookupTrafficForwardingStaticIPArgs struct {
// (String) Additional information about this static IP address
Comment *string `pulumi:"comment"`
// The unique identifier for the static IP address
Id *int `pulumi:"id"`
// The static IP address
IpAddress *string `pulumi:"ipAddress"`
}
// A collection of values returned by getTrafficForwardingStaticIP.
type LookupTrafficForwardingStaticIPResult struct {
// (String) Additional information about this static IP address
Comment *string `pulumi:"comment"`
// (Boolean) If not set, geographic coordinates and city are automatically determined from the IP address. Otherwise, the latitude and longitude coordinates must be provided.
GeoOverride bool `pulumi:"geoOverride"`
// (String) Identifier that uniquely identifies an entity
Id int `pulumi:"id"`
// (String) The static IP address
IpAddress string `pulumi:"ipAddress"`
// (Number) When the static IP address was last modified
LastModificationTime int `pulumi:"lastModificationTime"`
// (Set of Object)
LastModifiedBies []GetTrafficForwardingStaticIPLastModifiedBy `pulumi:"lastModifiedBies"`
// (Number) Required only if the geoOverride attribute is set. Latitude with 7 digit precision after decimal point, ranges between `-90` and `90` degrees.
Latitude int `pulumi:"latitude"`
// (Number) Required only if the geoOverride attribute is set. Longitude with 7 digit precision after decimal point, ranges between `-180` and `180` degrees.
Longitude int `pulumi:"longitude"`
// (Set of Object)
ManagedBies []GetTrafficForwardingStaticIPManagedBy `pulumi:"managedBies"`
// (Boolean) Indicates whether a non-RFC 1918 IP address is publicly routable. This attribute is ignored if there is no ZIA Private Service Edge associated to the organization.
RoutableIp bool `pulumi:"routableIp"`
}
func LookupTrafficForwardingStaticIPOutput(ctx *pulumi.Context, args LookupTrafficForwardingStaticIPOutputArgs, opts ...pulumi.InvokeOption) LookupTrafficForwardingStaticIPResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupTrafficForwardingStaticIPResult, error) {
args := v.(LookupTrafficForwardingStaticIPArgs)
r, err := LookupTrafficForwardingStaticIP(ctx, &args, opts...)
var s LookupTrafficForwardingStaticIPResult
if r != nil {
s = *r
}
return s, err
}).(LookupTrafficForwardingStaticIPResultOutput)
}
// A collection of arguments for invoking getTrafficForwardingStaticIP.
type LookupTrafficForwardingStaticIPOutputArgs struct {
// (String) Additional information about this static IP address
Comment pulumi.StringPtrInput `pulumi:"comment"`
// The unique identifier for the static IP address
Id pulumi.IntPtrInput `pulumi:"id"`
// The static IP address
IpAddress pulumi.StringPtrInput `pulumi:"ipAddress"`
}
func (LookupTrafficForwardingStaticIPOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTrafficForwardingStaticIPArgs)(nil)).Elem()
}
// A collection of values returned by getTrafficForwardingStaticIP.
type LookupTrafficForwardingStaticIPResultOutput struct{ *pulumi.OutputState }
func (LookupTrafficForwardingStaticIPResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupTrafficForwardingStaticIPResult)(nil)).Elem()
}
func (o LookupTrafficForwardingStaticIPResultOutput) ToLookupTrafficForwardingStaticIPResultOutput() LookupTrafficForwardingStaticIPResultOutput {
return o
}
func (o LookupTrafficForwardingStaticIPResultOutput) ToLookupTrafficForwardingStaticIPResultOutputWithContext(ctx context.Context) LookupTrafficForwardingStaticIPResultOutput {
return o
}
// (String) Additional information about this static IP address
func (o LookupTrafficForwardingStaticIPResultOutput) Comment() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupTrafficForwardingStaticIPResult) *string { return v.Comment }).(pulumi.StringPtrOutput)
}
// (Boolean) If not set, geographic coordinates and city are automatically determined from the IP address. Otherwise, the latitude and longitude coordinates must be provided.
func (o LookupTrafficForwardingStaticIPResultOutput) GeoOverride() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTrafficForwardingStaticIPResult) bool { return v.GeoOverride }).(pulumi.BoolOutput)
}
// (String) Identifier that uniquely identifies an entity
func (o LookupTrafficForwardingStaticIPResultOutput) Id() pulumi.IntOutput {
return o.ApplyT(func(v LookupTrafficForwardingStaticIPResult) int { return v.Id }).(pulumi.IntOutput)
}
// (String) The static IP address
func (o LookupTrafficForwardingStaticIPResultOutput) IpAddress() pulumi.StringOutput {
return o.ApplyT(func(v LookupTrafficForwardingStaticIPResult) string { return v.IpAddress }).(pulumi.StringOutput)
}
// (Number) When the static IP address was last modified
func (o LookupTrafficForwardingStaticIPResultOutput) LastModificationTime() pulumi.IntOutput {
return o.ApplyT(func(v LookupTrafficForwardingStaticIPResult) int { return v.LastModificationTime }).(pulumi.IntOutput)
}
// (Set of Object)
func (o LookupTrafficForwardingStaticIPResultOutput) LastModifiedBies() GetTrafficForwardingStaticIPLastModifiedByArrayOutput {
return o.ApplyT(func(v LookupTrafficForwardingStaticIPResult) []GetTrafficForwardingStaticIPLastModifiedBy {
return v.LastModifiedBies
}).(GetTrafficForwardingStaticIPLastModifiedByArrayOutput)
}
// (Number) Required only if the geoOverride attribute is set. Latitude with 7 digit precision after decimal point, ranges between `-90` and `90` degrees.
func (o LookupTrafficForwardingStaticIPResultOutput) Latitude() pulumi.IntOutput {
return o.ApplyT(func(v LookupTrafficForwardingStaticIPResult) int { return v.Latitude }).(pulumi.IntOutput)
}
// (Number) Required only if the geoOverride attribute is set. Longitude with 7 digit precision after decimal point, ranges between `-180` and `180` degrees.
func (o LookupTrafficForwardingStaticIPResultOutput) Longitude() pulumi.IntOutput {
return o.ApplyT(func(v LookupTrafficForwardingStaticIPResult) int { return v.Longitude }).(pulumi.IntOutput)
}
// (Set of Object)
func (o LookupTrafficForwardingStaticIPResultOutput) ManagedBies() GetTrafficForwardingStaticIPManagedByArrayOutput {
return o.ApplyT(func(v LookupTrafficForwardingStaticIPResult) []GetTrafficForwardingStaticIPManagedBy {
return v.ManagedBies
}).(GetTrafficForwardingStaticIPManagedByArrayOutput)
}
// (Boolean) Indicates whether a non-RFC 1918 IP address is publicly routable. This attribute is ignored if there is no ZIA Private Service Edge associated to the organization.
func (o LookupTrafficForwardingStaticIPResultOutput) RoutableIp() pulumi.BoolOutput {
return o.ApplyT(func(v LookupTrafficForwardingStaticIPResult) bool { return v.RoutableIp }).(pulumi.BoolOutput)
}
func init() {
pulumi.RegisterOutputType(LookupTrafficForwardingStaticIPResultOutput{})
}