github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/core/v1/limitRangePatch.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 // LimitRange sets resource usage limits for each kind of resource in a Namespace. 21 type LimitRangePatch 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 defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 31 Spec LimitRangeSpecPatchPtrOutput `pulumi:"spec"` 32 } 33 34 // NewLimitRangePatch registers a new resource with the given unique name, arguments, and options. 35 func NewLimitRangePatch(ctx *pulumi.Context, 36 name string, args *LimitRangePatchArgs, opts ...pulumi.ResourceOption) (*LimitRangePatch, error) { 37 if args == nil { 38 args = &LimitRangePatchArgs{} 39 } 40 41 args.ApiVersion = pulumi.StringPtr("v1") 42 args.Kind = pulumi.StringPtr("LimitRange") 43 var resource LimitRangePatch 44 err := ctx.RegisterResource("kubernetes:core/v1:LimitRangePatch", name, args, &resource, opts...) 45 if err != nil { 46 return nil, err 47 } 48 return &resource, nil 49 } 50 51 // GetLimitRangePatch gets an existing LimitRangePatch 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 GetLimitRangePatch(ctx *pulumi.Context, 54 name string, id pulumi.IDInput, state *LimitRangePatchState, opts ...pulumi.ResourceOption) (*LimitRangePatch, error) { 55 var resource LimitRangePatch 56 err := ctx.ReadResource("kubernetes:core/v1:LimitRangePatch", 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 LimitRangePatch resources. 64 type limitRangePatchState struct { 65 } 66 67 type LimitRangePatchState struct { 68 } 69 70 func (LimitRangePatchState) ElementType() reflect.Type { 71 return reflect.TypeOf((*limitRangePatchState)(nil)).Elem() 72 } 73 74 type limitRangePatchArgs 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 defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 82 Spec *LimitRangeSpecPatch `pulumi:"spec"` 83 } 84 85 // The set of arguments for constructing a LimitRangePatch resource. 86 type LimitRangePatchArgs 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 defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 94 Spec LimitRangeSpecPatchPtrInput 95 } 96 97 func (LimitRangePatchArgs) ElementType() reflect.Type { 98 return reflect.TypeOf((*limitRangePatchArgs)(nil)).Elem() 99 } 100 101 type LimitRangePatchInput interface { 102 pulumi.Input 103 104 ToLimitRangePatchOutput() LimitRangePatchOutput 105 ToLimitRangePatchOutputWithContext(ctx context.Context) LimitRangePatchOutput 106 } 107 108 func (*LimitRangePatch) ElementType() reflect.Type { 109 return reflect.TypeOf((**LimitRangePatch)(nil)).Elem() 110 } 111 112 func (i *LimitRangePatch) ToLimitRangePatchOutput() LimitRangePatchOutput { 113 return i.ToLimitRangePatchOutputWithContext(context.Background()) 114 } 115 116 func (i *LimitRangePatch) ToLimitRangePatchOutputWithContext(ctx context.Context) LimitRangePatchOutput { 117 return pulumi.ToOutputWithContext(ctx, i).(LimitRangePatchOutput) 118 } 119 120 // LimitRangePatchArrayInput is an input type that accepts LimitRangePatchArray and LimitRangePatchArrayOutput values. 121 // You can construct a concrete instance of `LimitRangePatchArrayInput` via: 122 // 123 // LimitRangePatchArray{ LimitRangePatchArgs{...} } 124 type LimitRangePatchArrayInput interface { 125 pulumi.Input 126 127 ToLimitRangePatchArrayOutput() LimitRangePatchArrayOutput 128 ToLimitRangePatchArrayOutputWithContext(context.Context) LimitRangePatchArrayOutput 129 } 130 131 type LimitRangePatchArray []LimitRangePatchInput 132 133 func (LimitRangePatchArray) ElementType() reflect.Type { 134 return reflect.TypeOf((*[]*LimitRangePatch)(nil)).Elem() 135 } 136 137 func (i LimitRangePatchArray) ToLimitRangePatchArrayOutput() LimitRangePatchArrayOutput { 138 return i.ToLimitRangePatchArrayOutputWithContext(context.Background()) 139 } 140 141 func (i LimitRangePatchArray) ToLimitRangePatchArrayOutputWithContext(ctx context.Context) LimitRangePatchArrayOutput { 142 return pulumi.ToOutputWithContext(ctx, i).(LimitRangePatchArrayOutput) 143 } 144 145 // LimitRangePatchMapInput is an input type that accepts LimitRangePatchMap and LimitRangePatchMapOutput values. 146 // You can construct a concrete instance of `LimitRangePatchMapInput` via: 147 // 148 // LimitRangePatchMap{ "key": LimitRangePatchArgs{...} } 149 type LimitRangePatchMapInput interface { 150 pulumi.Input 151 152 ToLimitRangePatchMapOutput() LimitRangePatchMapOutput 153 ToLimitRangePatchMapOutputWithContext(context.Context) LimitRangePatchMapOutput 154 } 155 156 type LimitRangePatchMap map[string]LimitRangePatchInput 157 158 func (LimitRangePatchMap) ElementType() reflect.Type { 159 return reflect.TypeOf((*map[string]*LimitRangePatch)(nil)).Elem() 160 } 161 162 func (i LimitRangePatchMap) ToLimitRangePatchMapOutput() LimitRangePatchMapOutput { 163 return i.ToLimitRangePatchMapOutputWithContext(context.Background()) 164 } 165 166 func (i LimitRangePatchMap) ToLimitRangePatchMapOutputWithContext(ctx context.Context) LimitRangePatchMapOutput { 167 return pulumi.ToOutputWithContext(ctx, i).(LimitRangePatchMapOutput) 168 } 169 170 type LimitRangePatchOutput struct{ *pulumi.OutputState } 171 172 func (LimitRangePatchOutput) ElementType() reflect.Type { 173 return reflect.TypeOf((**LimitRangePatch)(nil)).Elem() 174 } 175 176 func (o LimitRangePatchOutput) ToLimitRangePatchOutput() LimitRangePatchOutput { 177 return o 178 } 179 180 func (o LimitRangePatchOutput) ToLimitRangePatchOutputWithContext(ctx context.Context) LimitRangePatchOutput { 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 LimitRangePatchOutput) ApiVersion() pulumi.StringPtrOutput { 186 return o.ApplyT(func(v *LimitRangePatch) 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 LimitRangePatchOutput) Kind() pulumi.StringPtrOutput { 191 return o.ApplyT(func(v *LimitRangePatch) 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 LimitRangePatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 196 return o.ApplyT(func(v *LimitRangePatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 197 } 198 199 // Spec defines the limits enforced. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 200 func (o LimitRangePatchOutput) Spec() LimitRangeSpecPatchPtrOutput { 201 return o.ApplyT(func(v *LimitRangePatch) LimitRangeSpecPatchPtrOutput { return v.Spec }).(LimitRangeSpecPatchPtrOutput) 202 } 203 204 type LimitRangePatchArrayOutput struct{ *pulumi.OutputState } 205 206 func (LimitRangePatchArrayOutput) ElementType() reflect.Type { 207 return reflect.TypeOf((*[]*LimitRangePatch)(nil)).Elem() 208 } 209 210 func (o LimitRangePatchArrayOutput) ToLimitRangePatchArrayOutput() LimitRangePatchArrayOutput { 211 return o 212 } 213 214 func (o LimitRangePatchArrayOutput) ToLimitRangePatchArrayOutputWithContext(ctx context.Context) LimitRangePatchArrayOutput { 215 return o 216 } 217 218 func (o LimitRangePatchArrayOutput) Index(i pulumi.IntInput) LimitRangePatchOutput { 219 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *LimitRangePatch { 220 return vs[0].([]*LimitRangePatch)[vs[1].(int)] 221 }).(LimitRangePatchOutput) 222 } 223 224 type LimitRangePatchMapOutput struct{ *pulumi.OutputState } 225 226 func (LimitRangePatchMapOutput) ElementType() reflect.Type { 227 return reflect.TypeOf((*map[string]*LimitRangePatch)(nil)).Elem() 228 } 229 230 func (o LimitRangePatchMapOutput) ToLimitRangePatchMapOutput() LimitRangePatchMapOutput { 231 return o 232 } 233 234 func (o LimitRangePatchMapOutput) ToLimitRangePatchMapOutputWithContext(ctx context.Context) LimitRangePatchMapOutput { 235 return o 236 } 237 238 func (o LimitRangePatchMapOutput) MapIndex(k pulumi.StringInput) LimitRangePatchOutput { 239 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *LimitRangePatch { 240 return vs[0].(map[string]*LimitRangePatch)[vs[1].(string)] 241 }).(LimitRangePatchOutput) 242 } 243 244 func init() { 245 pulumi.RegisterInputType(reflect.TypeOf((*LimitRangePatchInput)(nil)).Elem(), &LimitRangePatch{}) 246 pulumi.RegisterInputType(reflect.TypeOf((*LimitRangePatchArrayInput)(nil)).Elem(), LimitRangePatchArray{}) 247 pulumi.RegisterInputType(reflect.TypeOf((*LimitRangePatchMapInput)(nil)).Elem(), LimitRangePatchMap{}) 248 pulumi.RegisterOutputType(LimitRangePatchOutput{}) 249 pulumi.RegisterOutputType(LimitRangePatchArrayOutput{}) 250 pulumi.RegisterOutputType(LimitRangePatchMapOutput{}) 251 }