github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/core/v1/endpointsPatch.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 v1 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 // Endpoints is a collection of endpoints that implement the actual service. Example: 21 // 22 // Name: "mysvc", 23 // Subsets: [ 24 // { 25 // Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], 26 // Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] 27 // }, 28 // { 29 // Addresses: [{"ip": "10.10.3.3"}], 30 // Ports: [{"name": "a", "port": 93}, {"name": "b", "port": 76}] 31 // }, 32 // ] 33 type EndpointsPatch struct { 34 pulumi.CustomResourceState 35 36 // 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 37 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 38 // 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 39 Kind pulumi.StringPtrOutput `pulumi:"kind"` 40 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 41 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 42 // The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service. 43 Subsets EndpointSubsetPatchArrayOutput `pulumi:"subsets"` 44 } 45 46 // NewEndpointsPatch registers a new resource with the given unique name, arguments, and options. 47 func NewEndpointsPatch(ctx *pulumi.Context, 48 name string, args *EndpointsPatchArgs, opts ...pulumi.ResourceOption) (*EndpointsPatch, error) { 49 if args == nil { 50 args = &EndpointsPatchArgs{} 51 } 52 53 args.ApiVersion = pulumi.StringPtr("v1") 54 args.Kind = pulumi.StringPtr("Endpoints") 55 var resource EndpointsPatch 56 err := ctx.RegisterResource("kubernetes:core/v1:EndpointsPatch", name, args, &resource, opts...) 57 if err != nil { 58 return nil, err 59 } 60 return &resource, nil 61 } 62 63 // GetEndpointsPatch gets an existing EndpointsPatch resource's state with the given name, ID, and optional 64 // state properties that are used to uniquely qualify the lookup (nil if not required). 65 func GetEndpointsPatch(ctx *pulumi.Context, 66 name string, id pulumi.IDInput, state *EndpointsPatchState, opts ...pulumi.ResourceOption) (*EndpointsPatch, error) { 67 var resource EndpointsPatch 68 err := ctx.ReadResource("kubernetes:core/v1:EndpointsPatch", name, id, state, &resource, opts...) 69 if err != nil { 70 return nil, err 71 } 72 return &resource, nil 73 } 74 75 // Input properties used for looking up and filtering EndpointsPatch resources. 76 type endpointsPatchState struct { 77 } 78 79 type EndpointsPatchState struct { 80 } 81 82 func (EndpointsPatchState) ElementType() reflect.Type { 83 return reflect.TypeOf((*endpointsPatchState)(nil)).Elem() 84 } 85 86 type endpointsPatchArgs 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 *string `pulumi:"apiVersion"` 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 *string `pulumi:"kind"` 91 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 92 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 93 // The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service. 94 Subsets []EndpointSubsetPatch `pulumi:"subsets"` 95 } 96 97 // The set of arguments for constructing a EndpointsPatch resource. 98 type EndpointsPatchArgs struct { 99 // 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 100 ApiVersion pulumi.StringPtrInput 101 // 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 102 Kind pulumi.StringPtrInput 103 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 104 Metadata metav1.ObjectMetaPatchPtrInput 105 // The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service. 106 Subsets EndpointSubsetPatchArrayInput 107 } 108 109 func (EndpointsPatchArgs) ElementType() reflect.Type { 110 return reflect.TypeOf((*endpointsPatchArgs)(nil)).Elem() 111 } 112 113 type EndpointsPatchInput interface { 114 pulumi.Input 115 116 ToEndpointsPatchOutput() EndpointsPatchOutput 117 ToEndpointsPatchOutputWithContext(ctx context.Context) EndpointsPatchOutput 118 } 119 120 func (*EndpointsPatch) ElementType() reflect.Type { 121 return reflect.TypeOf((**EndpointsPatch)(nil)).Elem() 122 } 123 124 func (i *EndpointsPatch) ToEndpointsPatchOutput() EndpointsPatchOutput { 125 return i.ToEndpointsPatchOutputWithContext(context.Background()) 126 } 127 128 func (i *EndpointsPatch) ToEndpointsPatchOutputWithContext(ctx context.Context) EndpointsPatchOutput { 129 return pulumi.ToOutputWithContext(ctx, i).(EndpointsPatchOutput) 130 } 131 132 // EndpointsPatchArrayInput is an input type that accepts EndpointsPatchArray and EndpointsPatchArrayOutput values. 133 // You can construct a concrete instance of `EndpointsPatchArrayInput` via: 134 // 135 // EndpointsPatchArray{ EndpointsPatchArgs{...} } 136 type EndpointsPatchArrayInput interface { 137 pulumi.Input 138 139 ToEndpointsPatchArrayOutput() EndpointsPatchArrayOutput 140 ToEndpointsPatchArrayOutputWithContext(context.Context) EndpointsPatchArrayOutput 141 } 142 143 type EndpointsPatchArray []EndpointsPatchInput 144 145 func (EndpointsPatchArray) ElementType() reflect.Type { 146 return reflect.TypeOf((*[]*EndpointsPatch)(nil)).Elem() 147 } 148 149 func (i EndpointsPatchArray) ToEndpointsPatchArrayOutput() EndpointsPatchArrayOutput { 150 return i.ToEndpointsPatchArrayOutputWithContext(context.Background()) 151 } 152 153 func (i EndpointsPatchArray) ToEndpointsPatchArrayOutputWithContext(ctx context.Context) EndpointsPatchArrayOutput { 154 return pulumi.ToOutputWithContext(ctx, i).(EndpointsPatchArrayOutput) 155 } 156 157 // EndpointsPatchMapInput is an input type that accepts EndpointsPatchMap and EndpointsPatchMapOutput values. 158 // You can construct a concrete instance of `EndpointsPatchMapInput` via: 159 // 160 // EndpointsPatchMap{ "key": EndpointsPatchArgs{...} } 161 type EndpointsPatchMapInput interface { 162 pulumi.Input 163 164 ToEndpointsPatchMapOutput() EndpointsPatchMapOutput 165 ToEndpointsPatchMapOutputWithContext(context.Context) EndpointsPatchMapOutput 166 } 167 168 type EndpointsPatchMap map[string]EndpointsPatchInput 169 170 func (EndpointsPatchMap) ElementType() reflect.Type { 171 return reflect.TypeOf((*map[string]*EndpointsPatch)(nil)).Elem() 172 } 173 174 func (i EndpointsPatchMap) ToEndpointsPatchMapOutput() EndpointsPatchMapOutput { 175 return i.ToEndpointsPatchMapOutputWithContext(context.Background()) 176 } 177 178 func (i EndpointsPatchMap) ToEndpointsPatchMapOutputWithContext(ctx context.Context) EndpointsPatchMapOutput { 179 return pulumi.ToOutputWithContext(ctx, i).(EndpointsPatchMapOutput) 180 } 181 182 type EndpointsPatchOutput struct{ *pulumi.OutputState } 183 184 func (EndpointsPatchOutput) ElementType() reflect.Type { 185 return reflect.TypeOf((**EndpointsPatch)(nil)).Elem() 186 } 187 188 func (o EndpointsPatchOutput) ToEndpointsPatchOutput() EndpointsPatchOutput { 189 return o 190 } 191 192 func (o EndpointsPatchOutput) ToEndpointsPatchOutputWithContext(ctx context.Context) EndpointsPatchOutput { 193 return o 194 } 195 196 // 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 197 func (o EndpointsPatchOutput) ApiVersion() pulumi.StringPtrOutput { 198 return o.ApplyT(func(v *EndpointsPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 199 } 200 201 // 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 202 func (o EndpointsPatchOutput) Kind() pulumi.StringPtrOutput { 203 return o.ApplyT(func(v *EndpointsPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 204 } 205 206 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 207 func (o EndpointsPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 208 return o.ApplyT(func(v *EndpointsPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 209 } 210 211 // The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service. 212 func (o EndpointsPatchOutput) Subsets() EndpointSubsetPatchArrayOutput { 213 return o.ApplyT(func(v *EndpointsPatch) EndpointSubsetPatchArrayOutput { return v.Subsets }).(EndpointSubsetPatchArrayOutput) 214 } 215 216 type EndpointsPatchArrayOutput struct{ *pulumi.OutputState } 217 218 func (EndpointsPatchArrayOutput) ElementType() reflect.Type { 219 return reflect.TypeOf((*[]*EndpointsPatch)(nil)).Elem() 220 } 221 222 func (o EndpointsPatchArrayOutput) ToEndpointsPatchArrayOutput() EndpointsPatchArrayOutput { 223 return o 224 } 225 226 func (o EndpointsPatchArrayOutput) ToEndpointsPatchArrayOutputWithContext(ctx context.Context) EndpointsPatchArrayOutput { 227 return o 228 } 229 230 func (o EndpointsPatchArrayOutput) Index(i pulumi.IntInput) EndpointsPatchOutput { 231 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *EndpointsPatch { 232 return vs[0].([]*EndpointsPatch)[vs[1].(int)] 233 }).(EndpointsPatchOutput) 234 } 235 236 type EndpointsPatchMapOutput struct{ *pulumi.OutputState } 237 238 func (EndpointsPatchMapOutput) ElementType() reflect.Type { 239 return reflect.TypeOf((*map[string]*EndpointsPatch)(nil)).Elem() 240 } 241 242 func (o EndpointsPatchMapOutput) ToEndpointsPatchMapOutput() EndpointsPatchMapOutput { 243 return o 244 } 245 246 func (o EndpointsPatchMapOutput) ToEndpointsPatchMapOutputWithContext(ctx context.Context) EndpointsPatchMapOutput { 247 return o 248 } 249 250 func (o EndpointsPatchMapOutput) MapIndex(k pulumi.StringInput) EndpointsPatchOutput { 251 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *EndpointsPatch { 252 return vs[0].(map[string]*EndpointsPatch)[vs[1].(string)] 253 }).(EndpointsPatchOutput) 254 } 255 256 func init() { 257 pulumi.RegisterInputType(reflect.TypeOf((*EndpointsPatchInput)(nil)).Elem(), &EndpointsPatch{}) 258 pulumi.RegisterInputType(reflect.TypeOf((*EndpointsPatchArrayInput)(nil)).Elem(), EndpointsPatchArray{}) 259 pulumi.RegisterInputType(reflect.TypeOf((*EndpointsPatchMapInput)(nil)).Elem(), EndpointsPatchMap{}) 260 pulumi.RegisterOutputType(EndpointsPatchOutput{}) 261 pulumi.RegisterOutputType(EndpointsPatchArrayOutput{}) 262 pulumi.RegisterOutputType(EndpointsPatchMapOutput{}) 263 }