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