github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/resource/v1alpha2/podSchedulingContextPatch.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 v1alpha2 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 // PodSchedulingContext 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 PodSchedulingContextPatch 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 PodSchedulingContextSpecPatchPtrOutput `pulumi:"spec"` 34 // Status describes where resources for the Pod can be allocated. 35 Status PodSchedulingContextStatusPatchPtrOutput `pulumi:"status"` 36 } 37 38 // NewPodSchedulingContextPatch registers a new resource with the given unique name, arguments, and options. 39 func NewPodSchedulingContextPatch(ctx *pulumi.Context, 40 name string, args *PodSchedulingContextPatchArgs, opts ...pulumi.ResourceOption) (*PodSchedulingContextPatch, error) { 41 if args == nil { 42 args = &PodSchedulingContextPatchArgs{} 43 } 44 45 args.ApiVersion = pulumi.StringPtr("resource.k8s.io/v1alpha2") 46 args.Kind = pulumi.StringPtr("PodSchedulingContext") 47 var resource PodSchedulingContextPatch 48 err := ctx.RegisterResource("kubernetes:resource.k8s.io/v1alpha2:PodSchedulingContextPatch", name, args, &resource, opts...) 49 if err != nil { 50 return nil, err 51 } 52 return &resource, nil 53 } 54 55 // GetPodSchedulingContextPatch gets an existing PodSchedulingContextPatch 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 GetPodSchedulingContextPatch(ctx *pulumi.Context, 58 name string, id pulumi.IDInput, state *PodSchedulingContextPatchState, opts ...pulumi.ResourceOption) (*PodSchedulingContextPatch, error) { 59 var resource PodSchedulingContextPatch 60 err := ctx.ReadResource("kubernetes:resource.k8s.io/v1alpha2:PodSchedulingContextPatch", 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 PodSchedulingContextPatch resources. 68 type podSchedulingContextPatchState struct { 69 } 70 71 type PodSchedulingContextPatchState struct { 72 } 73 74 func (PodSchedulingContextPatchState) ElementType() reflect.Type { 75 return reflect.TypeOf((*podSchedulingContextPatchState)(nil)).Elem() 76 } 77 78 type podSchedulingContextPatchArgs 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 *PodSchedulingContextSpecPatch `pulumi:"spec"` 87 } 88 89 // The set of arguments for constructing a PodSchedulingContextPatch resource. 90 type PodSchedulingContextPatchArgs 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 PodSchedulingContextSpecPatchPtrInput 99 } 100 101 func (PodSchedulingContextPatchArgs) ElementType() reflect.Type { 102 return reflect.TypeOf((*podSchedulingContextPatchArgs)(nil)).Elem() 103 } 104 105 type PodSchedulingContextPatchInput interface { 106 pulumi.Input 107 108 ToPodSchedulingContextPatchOutput() PodSchedulingContextPatchOutput 109 ToPodSchedulingContextPatchOutputWithContext(ctx context.Context) PodSchedulingContextPatchOutput 110 } 111 112 func (*PodSchedulingContextPatch) ElementType() reflect.Type { 113 return reflect.TypeOf((**PodSchedulingContextPatch)(nil)).Elem() 114 } 115 116 func (i *PodSchedulingContextPatch) ToPodSchedulingContextPatchOutput() PodSchedulingContextPatchOutput { 117 return i.ToPodSchedulingContextPatchOutputWithContext(context.Background()) 118 } 119 120 func (i *PodSchedulingContextPatch) ToPodSchedulingContextPatchOutputWithContext(ctx context.Context) PodSchedulingContextPatchOutput { 121 return pulumi.ToOutputWithContext(ctx, i).(PodSchedulingContextPatchOutput) 122 } 123 124 // PodSchedulingContextPatchArrayInput is an input type that accepts PodSchedulingContextPatchArray and PodSchedulingContextPatchArrayOutput values. 125 // You can construct a concrete instance of `PodSchedulingContextPatchArrayInput` via: 126 // 127 // PodSchedulingContextPatchArray{ PodSchedulingContextPatchArgs{...} } 128 type PodSchedulingContextPatchArrayInput interface { 129 pulumi.Input 130 131 ToPodSchedulingContextPatchArrayOutput() PodSchedulingContextPatchArrayOutput 132 ToPodSchedulingContextPatchArrayOutputWithContext(context.Context) PodSchedulingContextPatchArrayOutput 133 } 134 135 type PodSchedulingContextPatchArray []PodSchedulingContextPatchInput 136 137 func (PodSchedulingContextPatchArray) ElementType() reflect.Type { 138 return reflect.TypeOf((*[]*PodSchedulingContextPatch)(nil)).Elem() 139 } 140 141 func (i PodSchedulingContextPatchArray) ToPodSchedulingContextPatchArrayOutput() PodSchedulingContextPatchArrayOutput { 142 return i.ToPodSchedulingContextPatchArrayOutputWithContext(context.Background()) 143 } 144 145 func (i PodSchedulingContextPatchArray) ToPodSchedulingContextPatchArrayOutputWithContext(ctx context.Context) PodSchedulingContextPatchArrayOutput { 146 return pulumi.ToOutputWithContext(ctx, i).(PodSchedulingContextPatchArrayOutput) 147 } 148 149 // PodSchedulingContextPatchMapInput is an input type that accepts PodSchedulingContextPatchMap and PodSchedulingContextPatchMapOutput values. 150 // You can construct a concrete instance of `PodSchedulingContextPatchMapInput` via: 151 // 152 // PodSchedulingContextPatchMap{ "key": PodSchedulingContextPatchArgs{...} } 153 type PodSchedulingContextPatchMapInput interface { 154 pulumi.Input 155 156 ToPodSchedulingContextPatchMapOutput() PodSchedulingContextPatchMapOutput 157 ToPodSchedulingContextPatchMapOutputWithContext(context.Context) PodSchedulingContextPatchMapOutput 158 } 159 160 type PodSchedulingContextPatchMap map[string]PodSchedulingContextPatchInput 161 162 func (PodSchedulingContextPatchMap) ElementType() reflect.Type { 163 return reflect.TypeOf((*map[string]*PodSchedulingContextPatch)(nil)).Elem() 164 } 165 166 func (i PodSchedulingContextPatchMap) ToPodSchedulingContextPatchMapOutput() PodSchedulingContextPatchMapOutput { 167 return i.ToPodSchedulingContextPatchMapOutputWithContext(context.Background()) 168 } 169 170 func (i PodSchedulingContextPatchMap) ToPodSchedulingContextPatchMapOutputWithContext(ctx context.Context) PodSchedulingContextPatchMapOutput { 171 return pulumi.ToOutputWithContext(ctx, i).(PodSchedulingContextPatchMapOutput) 172 } 173 174 type PodSchedulingContextPatchOutput struct{ *pulumi.OutputState } 175 176 func (PodSchedulingContextPatchOutput) ElementType() reflect.Type { 177 return reflect.TypeOf((**PodSchedulingContextPatch)(nil)).Elem() 178 } 179 180 func (o PodSchedulingContextPatchOutput) ToPodSchedulingContextPatchOutput() PodSchedulingContextPatchOutput { 181 return o 182 } 183 184 func (o PodSchedulingContextPatchOutput) ToPodSchedulingContextPatchOutputWithContext(ctx context.Context) PodSchedulingContextPatchOutput { 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 PodSchedulingContextPatchOutput) ApiVersion() pulumi.StringPtrOutput { 190 return o.ApplyT(func(v *PodSchedulingContextPatch) 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 PodSchedulingContextPatchOutput) Kind() pulumi.StringPtrOutput { 195 return o.ApplyT(func(v *PodSchedulingContextPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 196 } 197 198 // Standard object metadata 199 func (o PodSchedulingContextPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 200 return o.ApplyT(func(v *PodSchedulingContextPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 201 } 202 203 // Spec describes where resources for the Pod are needed. 204 func (o PodSchedulingContextPatchOutput) Spec() PodSchedulingContextSpecPatchPtrOutput { 205 return o.ApplyT(func(v *PodSchedulingContextPatch) PodSchedulingContextSpecPatchPtrOutput { return v.Spec }).(PodSchedulingContextSpecPatchPtrOutput) 206 } 207 208 // Status describes where resources for the Pod can be allocated. 209 func (o PodSchedulingContextPatchOutput) Status() PodSchedulingContextStatusPatchPtrOutput { 210 return o.ApplyT(func(v *PodSchedulingContextPatch) PodSchedulingContextStatusPatchPtrOutput { return v.Status }).(PodSchedulingContextStatusPatchPtrOutput) 211 } 212 213 type PodSchedulingContextPatchArrayOutput struct{ *pulumi.OutputState } 214 215 func (PodSchedulingContextPatchArrayOutput) ElementType() reflect.Type { 216 return reflect.TypeOf((*[]*PodSchedulingContextPatch)(nil)).Elem() 217 } 218 219 func (o PodSchedulingContextPatchArrayOutput) ToPodSchedulingContextPatchArrayOutput() PodSchedulingContextPatchArrayOutput { 220 return o 221 } 222 223 func (o PodSchedulingContextPatchArrayOutput) ToPodSchedulingContextPatchArrayOutputWithContext(ctx context.Context) PodSchedulingContextPatchArrayOutput { 224 return o 225 } 226 227 func (o PodSchedulingContextPatchArrayOutput) Index(i pulumi.IntInput) PodSchedulingContextPatchOutput { 228 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PodSchedulingContextPatch { 229 return vs[0].([]*PodSchedulingContextPatch)[vs[1].(int)] 230 }).(PodSchedulingContextPatchOutput) 231 } 232 233 type PodSchedulingContextPatchMapOutput struct{ *pulumi.OutputState } 234 235 func (PodSchedulingContextPatchMapOutput) ElementType() reflect.Type { 236 return reflect.TypeOf((*map[string]*PodSchedulingContextPatch)(nil)).Elem() 237 } 238 239 func (o PodSchedulingContextPatchMapOutput) ToPodSchedulingContextPatchMapOutput() PodSchedulingContextPatchMapOutput { 240 return o 241 } 242 243 func (o PodSchedulingContextPatchMapOutput) ToPodSchedulingContextPatchMapOutputWithContext(ctx context.Context) PodSchedulingContextPatchMapOutput { 244 return o 245 } 246 247 func (o PodSchedulingContextPatchMapOutput) MapIndex(k pulumi.StringInput) PodSchedulingContextPatchOutput { 248 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PodSchedulingContextPatch { 249 return vs[0].(map[string]*PodSchedulingContextPatch)[vs[1].(string)] 250 }).(PodSchedulingContextPatchOutput) 251 } 252 253 func init() { 254 pulumi.RegisterInputType(reflect.TypeOf((*PodSchedulingContextPatchInput)(nil)).Elem(), &PodSchedulingContextPatch{}) 255 pulumi.RegisterInputType(reflect.TypeOf((*PodSchedulingContextPatchArrayInput)(nil)).Elem(), PodSchedulingContextPatchArray{}) 256 pulumi.RegisterInputType(reflect.TypeOf((*PodSchedulingContextPatchMapInput)(nil)).Elem(), PodSchedulingContextPatchMap{}) 257 pulumi.RegisterOutputType(PodSchedulingContextPatchOutput{}) 258 pulumi.RegisterOutputType(PodSchedulingContextPatchArrayOutput{}) 259 pulumi.RegisterOutputType(PodSchedulingContextPatchMapOutput{}) 260 }