github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/resource/v1alpha1/podSchedulingPatch.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 // PodScheduling objects hold information that is needed to schedule a Pod with ResourceClaims that use "WaitForFirstConsumer" allocation mode. 21 // 22 // This is an alpha type and requires enabling the DynamicResourceAllocation feature gate. 23 type PodSchedulingPatch struct { 24 pulumi.CustomResourceState 25 26 // 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 27 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 28 // 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 29 Kind pulumi.StringPtrOutput `pulumi:"kind"` 30 // Standard object metadata 31 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 32 // Spec describes where resources for the Pod are needed. 33 Spec PodSchedulingSpecPatchPtrOutput `pulumi:"spec"` 34 // Status describes where resources for the Pod can be allocated. 35 Status PodSchedulingStatusPatchPtrOutput `pulumi:"status"` 36 } 37 38 // NewPodSchedulingPatch registers a new resource with the given unique name, arguments, and options. 39 func NewPodSchedulingPatch(ctx *pulumi.Context, 40 name string, args *PodSchedulingPatchArgs, opts ...pulumi.ResourceOption) (*PodSchedulingPatch, error) { 41 if args == nil { 42 args = &PodSchedulingPatchArgs{} 43 } 44 45 args.ApiVersion = pulumi.StringPtr("resource.k8s.io/v1alpha1") 46 args.Kind = pulumi.StringPtr("PodScheduling") 47 var resource PodSchedulingPatch 48 err := ctx.RegisterResource("kubernetes:resource.k8s.io/v1alpha1:PodSchedulingPatch", name, args, &resource, opts...) 49 if err != nil { 50 return nil, err 51 } 52 return &resource, nil 53 } 54 55 // GetPodSchedulingPatch gets an existing PodSchedulingPatch resource's state with the given name, ID, and optional 56 // state properties that are used to uniquely qualify the lookup (nil if not required). 57 func GetPodSchedulingPatch(ctx *pulumi.Context, 58 name string, id pulumi.IDInput, state *PodSchedulingPatchState, opts ...pulumi.ResourceOption) (*PodSchedulingPatch, error) { 59 var resource PodSchedulingPatch 60 err := ctx.ReadResource("kubernetes:resource.k8s.io/v1alpha1:PodSchedulingPatch", name, id, state, &resource, opts...) 61 if err != nil { 62 return nil, err 63 } 64 return &resource, nil 65 } 66 67 // Input properties used for looking up and filtering PodSchedulingPatch resources. 68 type podSchedulingPatchState struct { 69 } 70 71 type PodSchedulingPatchState struct { 72 } 73 74 func (PodSchedulingPatchState) ElementType() reflect.Type { 75 return reflect.TypeOf((*podSchedulingPatchState)(nil)).Elem() 76 } 77 78 type podSchedulingPatchArgs struct { 79 // 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 80 ApiVersion *string `pulumi:"apiVersion"` 81 // 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 82 Kind *string `pulumi:"kind"` 83 // Standard object metadata 84 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 85 // Spec describes where resources for the Pod are needed. 86 Spec *PodSchedulingSpecPatch `pulumi:"spec"` 87 } 88 89 // The set of arguments for constructing a PodSchedulingPatch resource. 90 type PodSchedulingPatchArgs struct { 91 // 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 92 ApiVersion pulumi.StringPtrInput 93 // 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 94 Kind pulumi.StringPtrInput 95 // Standard object metadata 96 Metadata metav1.ObjectMetaPatchPtrInput 97 // Spec describes where resources for the Pod are needed. 98 Spec PodSchedulingSpecPatchPtrInput 99 } 100 101 func (PodSchedulingPatchArgs) ElementType() reflect.Type { 102 return reflect.TypeOf((*podSchedulingPatchArgs)(nil)).Elem() 103 } 104 105 type PodSchedulingPatchInput interface { 106 pulumi.Input 107 108 ToPodSchedulingPatchOutput() PodSchedulingPatchOutput 109 ToPodSchedulingPatchOutputWithContext(ctx context.Context) PodSchedulingPatchOutput 110 } 111 112 func (*PodSchedulingPatch) ElementType() reflect.Type { 113 return reflect.TypeOf((**PodSchedulingPatch)(nil)).Elem() 114 } 115 116 func (i *PodSchedulingPatch) ToPodSchedulingPatchOutput() PodSchedulingPatchOutput { 117 return i.ToPodSchedulingPatchOutputWithContext(context.Background()) 118 } 119 120 func (i *PodSchedulingPatch) ToPodSchedulingPatchOutputWithContext(ctx context.Context) PodSchedulingPatchOutput { 121 return pulumi.ToOutputWithContext(ctx, i).(PodSchedulingPatchOutput) 122 } 123 124 // PodSchedulingPatchArrayInput is an input type that accepts PodSchedulingPatchArray and PodSchedulingPatchArrayOutput values. 125 // You can construct a concrete instance of `PodSchedulingPatchArrayInput` via: 126 // 127 // PodSchedulingPatchArray{ PodSchedulingPatchArgs{...} } 128 type PodSchedulingPatchArrayInput interface { 129 pulumi.Input 130 131 ToPodSchedulingPatchArrayOutput() PodSchedulingPatchArrayOutput 132 ToPodSchedulingPatchArrayOutputWithContext(context.Context) PodSchedulingPatchArrayOutput 133 } 134 135 type PodSchedulingPatchArray []PodSchedulingPatchInput 136 137 func (PodSchedulingPatchArray) ElementType() reflect.Type { 138 return reflect.TypeOf((*[]*PodSchedulingPatch)(nil)).Elem() 139 } 140 141 func (i PodSchedulingPatchArray) ToPodSchedulingPatchArrayOutput() PodSchedulingPatchArrayOutput { 142 return i.ToPodSchedulingPatchArrayOutputWithContext(context.Background()) 143 } 144 145 func (i PodSchedulingPatchArray) ToPodSchedulingPatchArrayOutputWithContext(ctx context.Context) PodSchedulingPatchArrayOutput { 146 return pulumi.ToOutputWithContext(ctx, i).(PodSchedulingPatchArrayOutput) 147 } 148 149 // PodSchedulingPatchMapInput is an input type that accepts PodSchedulingPatchMap and PodSchedulingPatchMapOutput values. 150 // You can construct a concrete instance of `PodSchedulingPatchMapInput` via: 151 // 152 // PodSchedulingPatchMap{ "key": PodSchedulingPatchArgs{...} } 153 type PodSchedulingPatchMapInput interface { 154 pulumi.Input 155 156 ToPodSchedulingPatchMapOutput() PodSchedulingPatchMapOutput 157 ToPodSchedulingPatchMapOutputWithContext(context.Context) PodSchedulingPatchMapOutput 158 } 159 160 type PodSchedulingPatchMap map[string]PodSchedulingPatchInput 161 162 func (PodSchedulingPatchMap) ElementType() reflect.Type { 163 return reflect.TypeOf((*map[string]*PodSchedulingPatch)(nil)).Elem() 164 } 165 166 func (i PodSchedulingPatchMap) ToPodSchedulingPatchMapOutput() PodSchedulingPatchMapOutput { 167 return i.ToPodSchedulingPatchMapOutputWithContext(context.Background()) 168 } 169 170 func (i PodSchedulingPatchMap) ToPodSchedulingPatchMapOutputWithContext(ctx context.Context) PodSchedulingPatchMapOutput { 171 return pulumi.ToOutputWithContext(ctx, i).(PodSchedulingPatchMapOutput) 172 } 173 174 type PodSchedulingPatchOutput struct{ *pulumi.OutputState } 175 176 func (PodSchedulingPatchOutput) ElementType() reflect.Type { 177 return reflect.TypeOf((**PodSchedulingPatch)(nil)).Elem() 178 } 179 180 func (o PodSchedulingPatchOutput) ToPodSchedulingPatchOutput() PodSchedulingPatchOutput { 181 return o 182 } 183 184 func (o PodSchedulingPatchOutput) ToPodSchedulingPatchOutputWithContext(ctx context.Context) PodSchedulingPatchOutput { 185 return o 186 } 187 188 // 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 189 func (o PodSchedulingPatchOutput) ApiVersion() pulumi.StringPtrOutput { 190 return o.ApplyT(func(v *PodSchedulingPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 191 } 192 193 // 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 194 func (o PodSchedulingPatchOutput) Kind() pulumi.StringPtrOutput { 195 return o.ApplyT(func(v *PodSchedulingPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 196 } 197 198 // Standard object metadata 199 func (o PodSchedulingPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 200 return o.ApplyT(func(v *PodSchedulingPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 201 } 202 203 // Spec describes where resources for the Pod are needed. 204 func (o PodSchedulingPatchOutput) Spec() PodSchedulingSpecPatchPtrOutput { 205 return o.ApplyT(func(v *PodSchedulingPatch) PodSchedulingSpecPatchPtrOutput { return v.Spec }).(PodSchedulingSpecPatchPtrOutput) 206 } 207 208 // Status describes where resources for the Pod can be allocated. 209 func (o PodSchedulingPatchOutput) Status() PodSchedulingStatusPatchPtrOutput { 210 return o.ApplyT(func(v *PodSchedulingPatch) PodSchedulingStatusPatchPtrOutput { return v.Status }).(PodSchedulingStatusPatchPtrOutput) 211 } 212 213 type PodSchedulingPatchArrayOutput struct{ *pulumi.OutputState } 214 215 func (PodSchedulingPatchArrayOutput) ElementType() reflect.Type { 216 return reflect.TypeOf((*[]*PodSchedulingPatch)(nil)).Elem() 217 } 218 219 func (o PodSchedulingPatchArrayOutput) ToPodSchedulingPatchArrayOutput() PodSchedulingPatchArrayOutput { 220 return o 221 } 222 223 func (o PodSchedulingPatchArrayOutput) ToPodSchedulingPatchArrayOutputWithContext(ctx context.Context) PodSchedulingPatchArrayOutput { 224 return o 225 } 226 227 func (o PodSchedulingPatchArrayOutput) Index(i pulumi.IntInput) PodSchedulingPatchOutput { 228 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PodSchedulingPatch { 229 return vs[0].([]*PodSchedulingPatch)[vs[1].(int)] 230 }).(PodSchedulingPatchOutput) 231 } 232 233 type PodSchedulingPatchMapOutput struct{ *pulumi.OutputState } 234 235 func (PodSchedulingPatchMapOutput) ElementType() reflect.Type { 236 return reflect.TypeOf((*map[string]*PodSchedulingPatch)(nil)).Elem() 237 } 238 239 func (o PodSchedulingPatchMapOutput) ToPodSchedulingPatchMapOutput() PodSchedulingPatchMapOutput { 240 return o 241 } 242 243 func (o PodSchedulingPatchMapOutput) ToPodSchedulingPatchMapOutputWithContext(ctx context.Context) PodSchedulingPatchMapOutput { 244 return o 245 } 246 247 func (o PodSchedulingPatchMapOutput) MapIndex(k pulumi.StringInput) PodSchedulingPatchOutput { 248 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PodSchedulingPatch { 249 return vs[0].(map[string]*PodSchedulingPatch)[vs[1].(string)] 250 }).(PodSchedulingPatchOutput) 251 } 252 253 func init() { 254 pulumi.RegisterInputType(reflect.TypeOf((*PodSchedulingPatchInput)(nil)).Elem(), &PodSchedulingPatch{}) 255 pulumi.RegisterInputType(reflect.TypeOf((*PodSchedulingPatchArrayInput)(nil)).Elem(), PodSchedulingPatchArray{}) 256 pulumi.RegisterInputType(reflect.TypeOf((*PodSchedulingPatchMapInput)(nil)).Elem(), PodSchedulingPatchMap{}) 257 pulumi.RegisterOutputType(PodSchedulingPatchOutput{}) 258 pulumi.RegisterOutputType(PodSchedulingPatchArrayOutput{}) 259 pulumi.RegisterOutputType(PodSchedulingPatchMapOutput{}) 260 }