github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/networking/v1alpha1/ipaddressPatch.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 // Patch resources are used to modify existing Kubernetes resources by using 15 // Server-Side Apply updates. The name of the resource must be specified, but all other properties are optional. More than 16 // one patch may be applied to the same resource, and a random FieldManager name will be used for each Patch resource. 17 // Conflicts will result in an error by default, but can be forced using the "pulumi.com/patchForce" annotation. See the 18 // [Server-Side Apply Docs](https://www.pulumi.com/registry/packages/kubernetes/how-to-guides/managing-resources-with-server-side-apply/) for 19 // additional information about using Server-Side Apply to manage Kubernetes resources with Pulumi. 20 // 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 21 type IPAddressPatch struct { 22 pulumi.CustomResourceState 23 24 // 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 25 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 26 // 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 27 Kind pulumi.StringPtrOutput `pulumi:"kind"` 28 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 29 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 30 // 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 31 Spec IPAddressSpecPatchPtrOutput `pulumi:"spec"` 32 } 33 34 // NewIPAddressPatch registers a new resource with the given unique name, arguments, and options. 35 func NewIPAddressPatch(ctx *pulumi.Context, 36 name string, args *IPAddressPatchArgs, opts ...pulumi.ResourceOption) (*IPAddressPatch, error) { 37 if args == nil { 38 args = &IPAddressPatchArgs{} 39 } 40 41 args.ApiVersion = pulumi.StringPtr("networking.k8s.io/v1alpha1") 42 args.Kind = pulumi.StringPtr("IPAddress") 43 var resource IPAddressPatch 44 err := ctx.RegisterResource("kubernetes:networking.k8s.io/v1alpha1:IPAddressPatch", name, args, &resource, opts...) 45 if err != nil { 46 return nil, err 47 } 48 return &resource, nil 49 } 50 51 // GetIPAddressPatch gets an existing IPAddressPatch resource's state with the given name, ID, and optional 52 // state properties that are used to uniquely qualify the lookup (nil if not required). 53 func GetIPAddressPatch(ctx *pulumi.Context, 54 name string, id pulumi.IDInput, state *IPAddressPatchState, opts ...pulumi.ResourceOption) (*IPAddressPatch, error) { 55 var resource IPAddressPatch 56 err := ctx.ReadResource("kubernetes:networking.k8s.io/v1alpha1:IPAddressPatch", name, id, state, &resource, opts...) 57 if err != nil { 58 return nil, err 59 } 60 return &resource, nil 61 } 62 63 // Input properties used for looking up and filtering IPAddressPatch resources. 64 type ipaddressPatchState struct { 65 } 66 67 type IPAddressPatchState struct { 68 } 69 70 func (IPAddressPatchState) ElementType() reflect.Type { 71 return reflect.TypeOf((*ipaddressPatchState)(nil)).Elem() 72 } 73 74 type ipaddressPatchArgs struct { 75 // 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 76 ApiVersion *string `pulumi:"apiVersion"` 77 // 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 78 Kind *string `pulumi:"kind"` 79 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 80 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 81 // 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 82 Spec *IPAddressSpecPatch `pulumi:"spec"` 83 } 84 85 // The set of arguments for constructing a IPAddressPatch resource. 86 type IPAddressPatchArgs struct { 87 // 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 88 ApiVersion pulumi.StringPtrInput 89 // 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 90 Kind pulumi.StringPtrInput 91 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 92 Metadata metav1.ObjectMetaPatchPtrInput 93 // 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 94 Spec IPAddressSpecPatchPtrInput 95 } 96 97 func (IPAddressPatchArgs) ElementType() reflect.Type { 98 return reflect.TypeOf((*ipaddressPatchArgs)(nil)).Elem() 99 } 100 101 type IPAddressPatchInput interface { 102 pulumi.Input 103 104 ToIPAddressPatchOutput() IPAddressPatchOutput 105 ToIPAddressPatchOutputWithContext(ctx context.Context) IPAddressPatchOutput 106 } 107 108 func (*IPAddressPatch) ElementType() reflect.Type { 109 return reflect.TypeOf((**IPAddressPatch)(nil)).Elem() 110 } 111 112 func (i *IPAddressPatch) ToIPAddressPatchOutput() IPAddressPatchOutput { 113 return i.ToIPAddressPatchOutputWithContext(context.Background()) 114 } 115 116 func (i *IPAddressPatch) ToIPAddressPatchOutputWithContext(ctx context.Context) IPAddressPatchOutput { 117 return pulumi.ToOutputWithContext(ctx, i).(IPAddressPatchOutput) 118 } 119 120 // IPAddressPatchArrayInput is an input type that accepts IPAddressPatchArray and IPAddressPatchArrayOutput values. 121 // You can construct a concrete instance of `IPAddressPatchArrayInput` via: 122 // 123 // IPAddressPatchArray{ IPAddressPatchArgs{...} } 124 type IPAddressPatchArrayInput interface { 125 pulumi.Input 126 127 ToIPAddressPatchArrayOutput() IPAddressPatchArrayOutput 128 ToIPAddressPatchArrayOutputWithContext(context.Context) IPAddressPatchArrayOutput 129 } 130 131 type IPAddressPatchArray []IPAddressPatchInput 132 133 func (IPAddressPatchArray) ElementType() reflect.Type { 134 return reflect.TypeOf((*[]*IPAddressPatch)(nil)).Elem() 135 } 136 137 func (i IPAddressPatchArray) ToIPAddressPatchArrayOutput() IPAddressPatchArrayOutput { 138 return i.ToIPAddressPatchArrayOutputWithContext(context.Background()) 139 } 140 141 func (i IPAddressPatchArray) ToIPAddressPatchArrayOutputWithContext(ctx context.Context) IPAddressPatchArrayOutput { 142 return pulumi.ToOutputWithContext(ctx, i).(IPAddressPatchArrayOutput) 143 } 144 145 // IPAddressPatchMapInput is an input type that accepts IPAddressPatchMap and IPAddressPatchMapOutput values. 146 // You can construct a concrete instance of `IPAddressPatchMapInput` via: 147 // 148 // IPAddressPatchMap{ "key": IPAddressPatchArgs{...} } 149 type IPAddressPatchMapInput interface { 150 pulumi.Input 151 152 ToIPAddressPatchMapOutput() IPAddressPatchMapOutput 153 ToIPAddressPatchMapOutputWithContext(context.Context) IPAddressPatchMapOutput 154 } 155 156 type IPAddressPatchMap map[string]IPAddressPatchInput 157 158 func (IPAddressPatchMap) ElementType() reflect.Type { 159 return reflect.TypeOf((*map[string]*IPAddressPatch)(nil)).Elem() 160 } 161 162 func (i IPAddressPatchMap) ToIPAddressPatchMapOutput() IPAddressPatchMapOutput { 163 return i.ToIPAddressPatchMapOutputWithContext(context.Background()) 164 } 165 166 func (i IPAddressPatchMap) ToIPAddressPatchMapOutputWithContext(ctx context.Context) IPAddressPatchMapOutput { 167 return pulumi.ToOutputWithContext(ctx, i).(IPAddressPatchMapOutput) 168 } 169 170 type IPAddressPatchOutput struct{ *pulumi.OutputState } 171 172 func (IPAddressPatchOutput) ElementType() reflect.Type { 173 return reflect.TypeOf((**IPAddressPatch)(nil)).Elem() 174 } 175 176 func (o IPAddressPatchOutput) ToIPAddressPatchOutput() IPAddressPatchOutput { 177 return o 178 } 179 180 func (o IPAddressPatchOutput) ToIPAddressPatchOutputWithContext(ctx context.Context) IPAddressPatchOutput { 181 return o 182 } 183 184 // 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 185 func (o IPAddressPatchOutput) ApiVersion() pulumi.StringPtrOutput { 186 return o.ApplyT(func(v *IPAddressPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 187 } 188 189 // 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 190 func (o IPAddressPatchOutput) Kind() pulumi.StringPtrOutput { 191 return o.ApplyT(func(v *IPAddressPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 192 } 193 194 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 195 func (o IPAddressPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 196 return o.ApplyT(func(v *IPAddressPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 197 } 198 199 // 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 200 func (o IPAddressPatchOutput) Spec() IPAddressSpecPatchPtrOutput { 201 return o.ApplyT(func(v *IPAddressPatch) IPAddressSpecPatchPtrOutput { return v.Spec }).(IPAddressSpecPatchPtrOutput) 202 } 203 204 type IPAddressPatchArrayOutput struct{ *pulumi.OutputState } 205 206 func (IPAddressPatchArrayOutput) ElementType() reflect.Type { 207 return reflect.TypeOf((*[]*IPAddressPatch)(nil)).Elem() 208 } 209 210 func (o IPAddressPatchArrayOutput) ToIPAddressPatchArrayOutput() IPAddressPatchArrayOutput { 211 return o 212 } 213 214 func (o IPAddressPatchArrayOutput) ToIPAddressPatchArrayOutputWithContext(ctx context.Context) IPAddressPatchArrayOutput { 215 return o 216 } 217 218 func (o IPAddressPatchArrayOutput) Index(i pulumi.IntInput) IPAddressPatchOutput { 219 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IPAddressPatch { 220 return vs[0].([]*IPAddressPatch)[vs[1].(int)] 221 }).(IPAddressPatchOutput) 222 } 223 224 type IPAddressPatchMapOutput struct{ *pulumi.OutputState } 225 226 func (IPAddressPatchMapOutput) ElementType() reflect.Type { 227 return reflect.TypeOf((*map[string]*IPAddressPatch)(nil)).Elem() 228 } 229 230 func (o IPAddressPatchMapOutput) ToIPAddressPatchMapOutput() IPAddressPatchMapOutput { 231 return o 232 } 233 234 func (o IPAddressPatchMapOutput) ToIPAddressPatchMapOutputWithContext(ctx context.Context) IPAddressPatchMapOutput { 235 return o 236 } 237 238 func (o IPAddressPatchMapOutput) MapIndex(k pulumi.StringInput) IPAddressPatchOutput { 239 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IPAddressPatch { 240 return vs[0].(map[string]*IPAddressPatch)[vs[1].(string)] 241 }).(IPAddressPatchOutput) 242 } 243 244 func init() { 245 pulumi.RegisterInputType(reflect.TypeOf((*IPAddressPatchInput)(nil)).Elem(), &IPAddressPatch{}) 246 pulumi.RegisterInputType(reflect.TypeOf((*IPAddressPatchArrayInput)(nil)).Elem(), IPAddressPatchArray{}) 247 pulumi.RegisterInputType(reflect.TypeOf((*IPAddressPatchMapInput)(nil)).Elem(), IPAddressPatchMap{}) 248 pulumi.RegisterOutputType(IPAddressPatchOutput{}) 249 pulumi.RegisterOutputType(IPAddressPatchArrayOutput{}) 250 pulumi.RegisterOutputType(IPAddressPatchMapOutput{}) 251 }