github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/networking/v1alpha1/ipaddress.go (about) 1 // Code generated by pulumigen DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package v1alpha1 5 6 import ( 7 "context" 8 "reflect" 9 10 metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/meta/v1" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1 15 type IPAddress struct { 16 pulumi.CustomResourceState 17 18 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 19 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 20 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 21 Kind pulumi.StringPtrOutput `pulumi:"kind"` 22 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 23 Metadata metav1.ObjectMetaPtrOutput `pulumi:"metadata"` 24 // spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 25 Spec IPAddressSpecPtrOutput `pulumi:"spec"` 26 } 27 28 // NewIPAddress registers a new resource with the given unique name, arguments, and options. 29 func NewIPAddress(ctx *pulumi.Context, 30 name string, args *IPAddressArgs, opts ...pulumi.ResourceOption) (*IPAddress, error) { 31 if args == nil { 32 args = &IPAddressArgs{} 33 } 34 35 args.ApiVersion = pulumi.StringPtr("networking.k8s.io/v1alpha1") 36 args.Kind = pulumi.StringPtr("IPAddress") 37 var resource IPAddress 38 err := ctx.RegisterResource("kubernetes:networking.k8s.io/v1alpha1:IPAddress", name, args, &resource, opts...) 39 if err != nil { 40 return nil, err 41 } 42 return &resource, nil 43 } 44 45 // GetIPAddress gets an existing IPAddress resource's state with the given name, ID, and optional 46 // state properties that are used to uniquely qualify the lookup (nil if not required). 47 func GetIPAddress(ctx *pulumi.Context, 48 name string, id pulumi.IDInput, state *IPAddressState, opts ...pulumi.ResourceOption) (*IPAddress, error) { 49 var resource IPAddress 50 err := ctx.ReadResource("kubernetes:networking.k8s.io/v1alpha1:IPAddress", name, id, state, &resource, opts...) 51 if err != nil { 52 return nil, err 53 } 54 return &resource, nil 55 } 56 57 // Input properties used for looking up and filtering IPAddress resources. 58 type ipaddressState struct { 59 } 60 61 type IPAddressState struct { 62 } 63 64 func (IPAddressState) ElementType() reflect.Type { 65 return reflect.TypeOf((*ipaddressState)(nil)).Elem() 66 } 67 68 type ipaddressArgs struct { 69 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 70 ApiVersion *string `pulumi:"apiVersion"` 71 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 72 Kind *string `pulumi:"kind"` 73 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 74 Metadata *metav1.ObjectMeta `pulumi:"metadata"` 75 // spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 76 Spec *IPAddressSpec `pulumi:"spec"` 77 } 78 79 // The set of arguments for constructing a IPAddress resource. 80 type IPAddressArgs struct { 81 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 82 ApiVersion pulumi.StringPtrInput 83 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 84 Kind pulumi.StringPtrInput 85 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 86 Metadata metav1.ObjectMetaPtrInput 87 // spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 88 Spec IPAddressSpecPtrInput 89 } 90 91 func (IPAddressArgs) ElementType() reflect.Type { 92 return reflect.TypeOf((*ipaddressArgs)(nil)).Elem() 93 } 94 95 type IPAddressInput interface { 96 pulumi.Input 97 98 ToIPAddressOutput() IPAddressOutput 99 ToIPAddressOutputWithContext(ctx context.Context) IPAddressOutput 100 } 101 102 func (*IPAddress) ElementType() reflect.Type { 103 return reflect.TypeOf((**IPAddress)(nil)).Elem() 104 } 105 106 func (i *IPAddress) ToIPAddressOutput() IPAddressOutput { 107 return i.ToIPAddressOutputWithContext(context.Background()) 108 } 109 110 func (i *IPAddress) ToIPAddressOutputWithContext(ctx context.Context) IPAddressOutput { 111 return pulumi.ToOutputWithContext(ctx, i).(IPAddressOutput) 112 } 113 114 // IPAddressArrayInput is an input type that accepts IPAddressArray and IPAddressArrayOutput values. 115 // You can construct a concrete instance of `IPAddressArrayInput` via: 116 // 117 // IPAddressArray{ IPAddressArgs{...} } 118 type IPAddressArrayInput interface { 119 pulumi.Input 120 121 ToIPAddressArrayOutput() IPAddressArrayOutput 122 ToIPAddressArrayOutputWithContext(context.Context) IPAddressArrayOutput 123 } 124 125 type IPAddressArray []IPAddressInput 126 127 func (IPAddressArray) ElementType() reflect.Type { 128 return reflect.TypeOf((*[]*IPAddress)(nil)).Elem() 129 } 130 131 func (i IPAddressArray) ToIPAddressArrayOutput() IPAddressArrayOutput { 132 return i.ToIPAddressArrayOutputWithContext(context.Background()) 133 } 134 135 func (i IPAddressArray) ToIPAddressArrayOutputWithContext(ctx context.Context) IPAddressArrayOutput { 136 return pulumi.ToOutputWithContext(ctx, i).(IPAddressArrayOutput) 137 } 138 139 // IPAddressMapInput is an input type that accepts IPAddressMap and IPAddressMapOutput values. 140 // You can construct a concrete instance of `IPAddressMapInput` via: 141 // 142 // IPAddressMap{ "key": IPAddressArgs{...} } 143 type IPAddressMapInput interface { 144 pulumi.Input 145 146 ToIPAddressMapOutput() IPAddressMapOutput 147 ToIPAddressMapOutputWithContext(context.Context) IPAddressMapOutput 148 } 149 150 type IPAddressMap map[string]IPAddressInput 151 152 func (IPAddressMap) ElementType() reflect.Type { 153 return reflect.TypeOf((*map[string]*IPAddress)(nil)).Elem() 154 } 155 156 func (i IPAddressMap) ToIPAddressMapOutput() IPAddressMapOutput { 157 return i.ToIPAddressMapOutputWithContext(context.Background()) 158 } 159 160 func (i IPAddressMap) ToIPAddressMapOutputWithContext(ctx context.Context) IPAddressMapOutput { 161 return pulumi.ToOutputWithContext(ctx, i).(IPAddressMapOutput) 162 } 163 164 type IPAddressOutput struct{ *pulumi.OutputState } 165 166 func (IPAddressOutput) ElementType() reflect.Type { 167 return reflect.TypeOf((**IPAddress)(nil)).Elem() 168 } 169 170 func (o IPAddressOutput) ToIPAddressOutput() IPAddressOutput { 171 return o 172 } 173 174 func (o IPAddressOutput) ToIPAddressOutputWithContext(ctx context.Context) IPAddressOutput { 175 return o 176 } 177 178 // APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 179 func (o IPAddressOutput) ApiVersion() pulumi.StringPtrOutput { 180 return o.ApplyT(func(v *IPAddress) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 181 } 182 183 // Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 184 func (o IPAddressOutput) Kind() pulumi.StringPtrOutput { 185 return o.ApplyT(func(v *IPAddress) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 186 } 187 188 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 189 func (o IPAddressOutput) Metadata() metav1.ObjectMetaPtrOutput { 190 return o.ApplyT(func(v *IPAddress) metav1.ObjectMetaPtrOutput { return v.Metadata }).(metav1.ObjectMetaPtrOutput) 191 } 192 193 // spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 194 func (o IPAddressOutput) Spec() IPAddressSpecPtrOutput { 195 return o.ApplyT(func(v *IPAddress) IPAddressSpecPtrOutput { return v.Spec }).(IPAddressSpecPtrOutput) 196 } 197 198 type IPAddressArrayOutput struct{ *pulumi.OutputState } 199 200 func (IPAddressArrayOutput) ElementType() reflect.Type { 201 return reflect.TypeOf((*[]*IPAddress)(nil)).Elem() 202 } 203 204 func (o IPAddressArrayOutput) ToIPAddressArrayOutput() IPAddressArrayOutput { 205 return o 206 } 207 208 func (o IPAddressArrayOutput) ToIPAddressArrayOutputWithContext(ctx context.Context) IPAddressArrayOutput { 209 return o 210 } 211 212 func (o IPAddressArrayOutput) Index(i pulumi.IntInput) IPAddressOutput { 213 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IPAddress { 214 return vs[0].([]*IPAddress)[vs[1].(int)] 215 }).(IPAddressOutput) 216 } 217 218 type IPAddressMapOutput struct{ *pulumi.OutputState } 219 220 func (IPAddressMapOutput) ElementType() reflect.Type { 221 return reflect.TypeOf((*map[string]*IPAddress)(nil)).Elem() 222 } 223 224 func (o IPAddressMapOutput) ToIPAddressMapOutput() IPAddressMapOutput { 225 return o 226 } 227 228 func (o IPAddressMapOutput) ToIPAddressMapOutputWithContext(ctx context.Context) IPAddressMapOutput { 229 return o 230 } 231 232 func (o IPAddressMapOutput) MapIndex(k pulumi.StringInput) IPAddressOutput { 233 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IPAddress { 234 return vs[0].(map[string]*IPAddress)[vs[1].(string)] 235 }).(IPAddressOutput) 236 } 237 238 func init() { 239 pulumi.RegisterInputType(reflect.TypeOf((*IPAddressInput)(nil)).Elem(), &IPAddress{}) 240 pulumi.RegisterInputType(reflect.TypeOf((*IPAddressArrayInput)(nil)).Elem(), IPAddressArray{}) 241 pulumi.RegisterInputType(reflect.TypeOf((*IPAddressMapInput)(nil)).Elem(), IPAddressMap{}) 242 pulumi.RegisterOutputType(IPAddressOutput{}) 243 pulumi.RegisterOutputType(IPAddressArrayOutput{}) 244 pulumi.RegisterOutputType(IPAddressMapOutput{}) 245 }