github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/extensions/v1beta1/daemonSetPatch.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 v1beta1 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 // DaemonSet represents the configuration of a daemon set. 21 // 22 // Deprecated: extensions/v1beta1/DaemonSet is deprecated by apps/v1/DaemonSet and not supported by Kubernetes v1.16+ clusters. 23 type DaemonSetPatch 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's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 31 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 32 // The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 33 Spec DaemonSetSpecPatchPtrOutput `pulumi:"spec"` 34 // The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 35 Status DaemonSetStatusPatchPtrOutput `pulumi:"status"` 36 } 37 38 // NewDaemonSetPatch registers a new resource with the given unique name, arguments, and options. 39 func NewDaemonSetPatch(ctx *pulumi.Context, 40 name string, args *DaemonSetPatchArgs, opts ...pulumi.ResourceOption) (*DaemonSetPatch, error) { 41 if args == nil { 42 args = &DaemonSetPatchArgs{} 43 } 44 45 args.ApiVersion = pulumi.StringPtr("extensions/v1beta1") 46 args.Kind = pulumi.StringPtr("DaemonSet") 47 aliases := pulumi.Aliases([]pulumi.Alias{ 48 { 49 Type: pulumi.String("kubernetes:apps/v1:DaemonSetPatch"), 50 }, 51 { 52 Type: pulumi.String("kubernetes:apps/v1beta2:DaemonSetPatch"), 53 }, 54 }) 55 opts = append(opts, aliases) 56 var resource DaemonSetPatch 57 err := ctx.RegisterResource("kubernetes:extensions/v1beta1:DaemonSetPatch", name, args, &resource, opts...) 58 if err != nil { 59 return nil, err 60 } 61 return &resource, nil 62 } 63 64 // GetDaemonSetPatch gets an existing DaemonSetPatch resource's state with the given name, ID, and optional 65 // state properties that are used to uniquely qualify the lookup (nil if not required). 66 func GetDaemonSetPatch(ctx *pulumi.Context, 67 name string, id pulumi.IDInput, state *DaemonSetPatchState, opts ...pulumi.ResourceOption) (*DaemonSetPatch, error) { 68 var resource DaemonSetPatch 69 err := ctx.ReadResource("kubernetes:extensions/v1beta1:DaemonSetPatch", name, id, state, &resource, opts...) 70 if err != nil { 71 return nil, err 72 } 73 return &resource, nil 74 } 75 76 // Input properties used for looking up and filtering DaemonSetPatch resources. 77 type daemonSetPatchState struct { 78 } 79 80 type DaemonSetPatchState struct { 81 } 82 83 func (DaemonSetPatchState) ElementType() reflect.Type { 84 return reflect.TypeOf((*daemonSetPatchState)(nil)).Elem() 85 } 86 87 type daemonSetPatchArgs struct { 88 // 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 89 ApiVersion *string `pulumi:"apiVersion"` 90 // 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 91 Kind *string `pulumi:"kind"` 92 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 93 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 94 // The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 95 Spec *DaemonSetSpecPatch `pulumi:"spec"` 96 } 97 98 // The set of arguments for constructing a DaemonSetPatch resource. 99 type DaemonSetPatchArgs struct { 100 // 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 101 ApiVersion pulumi.StringPtrInput 102 // 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 103 Kind pulumi.StringPtrInput 104 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 105 Metadata metav1.ObjectMetaPatchPtrInput 106 // The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 107 Spec DaemonSetSpecPatchPtrInput 108 } 109 110 func (DaemonSetPatchArgs) ElementType() reflect.Type { 111 return reflect.TypeOf((*daemonSetPatchArgs)(nil)).Elem() 112 } 113 114 type DaemonSetPatchInput interface { 115 pulumi.Input 116 117 ToDaemonSetPatchOutput() DaemonSetPatchOutput 118 ToDaemonSetPatchOutputWithContext(ctx context.Context) DaemonSetPatchOutput 119 } 120 121 func (*DaemonSetPatch) ElementType() reflect.Type { 122 return reflect.TypeOf((**DaemonSetPatch)(nil)).Elem() 123 } 124 125 func (i *DaemonSetPatch) ToDaemonSetPatchOutput() DaemonSetPatchOutput { 126 return i.ToDaemonSetPatchOutputWithContext(context.Background()) 127 } 128 129 func (i *DaemonSetPatch) ToDaemonSetPatchOutputWithContext(ctx context.Context) DaemonSetPatchOutput { 130 return pulumi.ToOutputWithContext(ctx, i).(DaemonSetPatchOutput) 131 } 132 133 // DaemonSetPatchArrayInput is an input type that accepts DaemonSetPatchArray and DaemonSetPatchArrayOutput values. 134 // You can construct a concrete instance of `DaemonSetPatchArrayInput` via: 135 // 136 // DaemonSetPatchArray{ DaemonSetPatchArgs{...} } 137 type DaemonSetPatchArrayInput interface { 138 pulumi.Input 139 140 ToDaemonSetPatchArrayOutput() DaemonSetPatchArrayOutput 141 ToDaemonSetPatchArrayOutputWithContext(context.Context) DaemonSetPatchArrayOutput 142 } 143 144 type DaemonSetPatchArray []DaemonSetPatchInput 145 146 func (DaemonSetPatchArray) ElementType() reflect.Type { 147 return reflect.TypeOf((*[]*DaemonSetPatch)(nil)).Elem() 148 } 149 150 func (i DaemonSetPatchArray) ToDaemonSetPatchArrayOutput() DaemonSetPatchArrayOutput { 151 return i.ToDaemonSetPatchArrayOutputWithContext(context.Background()) 152 } 153 154 func (i DaemonSetPatchArray) ToDaemonSetPatchArrayOutputWithContext(ctx context.Context) DaemonSetPatchArrayOutput { 155 return pulumi.ToOutputWithContext(ctx, i).(DaemonSetPatchArrayOutput) 156 } 157 158 // DaemonSetPatchMapInput is an input type that accepts DaemonSetPatchMap and DaemonSetPatchMapOutput values. 159 // You can construct a concrete instance of `DaemonSetPatchMapInput` via: 160 // 161 // DaemonSetPatchMap{ "key": DaemonSetPatchArgs{...} } 162 type DaemonSetPatchMapInput interface { 163 pulumi.Input 164 165 ToDaemonSetPatchMapOutput() DaemonSetPatchMapOutput 166 ToDaemonSetPatchMapOutputWithContext(context.Context) DaemonSetPatchMapOutput 167 } 168 169 type DaemonSetPatchMap map[string]DaemonSetPatchInput 170 171 func (DaemonSetPatchMap) ElementType() reflect.Type { 172 return reflect.TypeOf((*map[string]*DaemonSetPatch)(nil)).Elem() 173 } 174 175 func (i DaemonSetPatchMap) ToDaemonSetPatchMapOutput() DaemonSetPatchMapOutput { 176 return i.ToDaemonSetPatchMapOutputWithContext(context.Background()) 177 } 178 179 func (i DaemonSetPatchMap) ToDaemonSetPatchMapOutputWithContext(ctx context.Context) DaemonSetPatchMapOutput { 180 return pulumi.ToOutputWithContext(ctx, i).(DaemonSetPatchMapOutput) 181 } 182 183 type DaemonSetPatchOutput struct{ *pulumi.OutputState } 184 185 func (DaemonSetPatchOutput) ElementType() reflect.Type { 186 return reflect.TypeOf((**DaemonSetPatch)(nil)).Elem() 187 } 188 189 func (o DaemonSetPatchOutput) ToDaemonSetPatchOutput() DaemonSetPatchOutput { 190 return o 191 } 192 193 func (o DaemonSetPatchOutput) ToDaemonSetPatchOutputWithContext(ctx context.Context) DaemonSetPatchOutput { 194 return o 195 } 196 197 // 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 198 func (o DaemonSetPatchOutput) ApiVersion() pulumi.StringPtrOutput { 199 return o.ApplyT(func(v *DaemonSetPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 200 } 201 202 // 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 203 func (o DaemonSetPatchOutput) Kind() pulumi.StringPtrOutput { 204 return o.ApplyT(func(v *DaemonSetPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 205 } 206 207 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 208 func (o DaemonSetPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 209 return o.ApplyT(func(v *DaemonSetPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 210 } 211 212 // The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 213 func (o DaemonSetPatchOutput) Spec() DaemonSetSpecPatchPtrOutput { 214 return o.ApplyT(func(v *DaemonSetPatch) DaemonSetSpecPatchPtrOutput { return v.Spec }).(DaemonSetSpecPatchPtrOutput) 215 } 216 217 // The current status of this daemon set. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 218 func (o DaemonSetPatchOutput) Status() DaemonSetStatusPatchPtrOutput { 219 return o.ApplyT(func(v *DaemonSetPatch) DaemonSetStatusPatchPtrOutput { return v.Status }).(DaemonSetStatusPatchPtrOutput) 220 } 221 222 type DaemonSetPatchArrayOutput struct{ *pulumi.OutputState } 223 224 func (DaemonSetPatchArrayOutput) ElementType() reflect.Type { 225 return reflect.TypeOf((*[]*DaemonSetPatch)(nil)).Elem() 226 } 227 228 func (o DaemonSetPatchArrayOutput) ToDaemonSetPatchArrayOutput() DaemonSetPatchArrayOutput { 229 return o 230 } 231 232 func (o DaemonSetPatchArrayOutput) ToDaemonSetPatchArrayOutputWithContext(ctx context.Context) DaemonSetPatchArrayOutput { 233 return o 234 } 235 236 func (o DaemonSetPatchArrayOutput) Index(i pulumi.IntInput) DaemonSetPatchOutput { 237 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DaemonSetPatch { 238 return vs[0].([]*DaemonSetPatch)[vs[1].(int)] 239 }).(DaemonSetPatchOutput) 240 } 241 242 type DaemonSetPatchMapOutput struct{ *pulumi.OutputState } 243 244 func (DaemonSetPatchMapOutput) ElementType() reflect.Type { 245 return reflect.TypeOf((*map[string]*DaemonSetPatch)(nil)).Elem() 246 } 247 248 func (o DaemonSetPatchMapOutput) ToDaemonSetPatchMapOutput() DaemonSetPatchMapOutput { 249 return o 250 } 251 252 func (o DaemonSetPatchMapOutput) ToDaemonSetPatchMapOutputWithContext(ctx context.Context) DaemonSetPatchMapOutput { 253 return o 254 } 255 256 func (o DaemonSetPatchMapOutput) MapIndex(k pulumi.StringInput) DaemonSetPatchOutput { 257 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DaemonSetPatch { 258 return vs[0].(map[string]*DaemonSetPatch)[vs[1].(string)] 259 }).(DaemonSetPatchOutput) 260 } 261 262 func init() { 263 pulumi.RegisterInputType(reflect.TypeOf((*DaemonSetPatchInput)(nil)).Elem(), &DaemonSetPatch{}) 264 pulumi.RegisterInputType(reflect.TypeOf((*DaemonSetPatchArrayInput)(nil)).Elem(), DaemonSetPatchArray{}) 265 pulumi.RegisterInputType(reflect.TypeOf((*DaemonSetPatchMapInput)(nil)).Elem(), DaemonSetPatchMap{}) 266 pulumi.RegisterOutputType(DaemonSetPatchOutput{}) 267 pulumi.RegisterOutputType(DaemonSetPatchArrayOutput{}) 268 pulumi.RegisterOutputType(DaemonSetPatchMapOutput{}) 269 }