github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/core/v1/configMapPatch.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 // ConfigMap holds configuration data for pods to consume. 21 type ConfigMapPatch 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 // BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. 27 BinaryData pulumi.StringMapOutput `pulumi:"binaryData"` 28 // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. 29 Data pulumi.StringMapOutput `pulumi:"data"` 30 // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. 31 Immutable pulumi.BoolPtrOutput `pulumi:"immutable"` 32 // 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 33 Kind pulumi.StringPtrOutput `pulumi:"kind"` 34 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 35 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 36 } 37 38 // NewConfigMapPatch registers a new resource with the given unique name, arguments, and options. 39 func NewConfigMapPatch(ctx *pulumi.Context, 40 name string, args *ConfigMapPatchArgs, opts ...pulumi.ResourceOption) (*ConfigMapPatch, error) { 41 if args == nil { 42 args = &ConfigMapPatchArgs{} 43 } 44 45 args.ApiVersion = pulumi.StringPtr("v1") 46 args.Kind = pulumi.StringPtr("ConfigMap") 47 var resource ConfigMapPatch 48 err := ctx.RegisterResource("kubernetes:core/v1:ConfigMapPatch", name, args, &resource, opts...) 49 if err != nil { 50 return nil, err 51 } 52 return &resource, nil 53 } 54 55 // GetConfigMapPatch gets an existing ConfigMapPatch 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 GetConfigMapPatch(ctx *pulumi.Context, 58 name string, id pulumi.IDInput, state *ConfigMapPatchState, opts ...pulumi.ResourceOption) (*ConfigMapPatch, error) { 59 var resource ConfigMapPatch 60 err := ctx.ReadResource("kubernetes:core/v1:ConfigMapPatch", 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 ConfigMapPatch resources. 68 type configMapPatchState struct { 69 } 70 71 type ConfigMapPatchState struct { 72 } 73 74 func (ConfigMapPatchState) ElementType() reflect.Type { 75 return reflect.TypeOf((*configMapPatchState)(nil)).Elem() 76 } 77 78 type configMapPatchArgs 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 // BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. 82 BinaryData map[string]string `pulumi:"binaryData"` 83 // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. 84 Data map[string]string `pulumi:"data"` 85 // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. 86 Immutable *bool `pulumi:"immutable"` 87 // 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 88 Kind *string `pulumi:"kind"` 89 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 90 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 91 } 92 93 // The set of arguments for constructing a ConfigMapPatch resource. 94 type ConfigMapPatchArgs struct { 95 // 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 96 ApiVersion pulumi.StringPtrInput 97 // BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. 98 BinaryData pulumi.StringMapInput 99 // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. 100 Data pulumi.StringMapInput 101 // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. 102 Immutable pulumi.BoolPtrInput 103 // 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 104 Kind pulumi.StringPtrInput 105 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 106 Metadata metav1.ObjectMetaPatchPtrInput 107 } 108 109 func (ConfigMapPatchArgs) ElementType() reflect.Type { 110 return reflect.TypeOf((*configMapPatchArgs)(nil)).Elem() 111 } 112 113 type ConfigMapPatchInput interface { 114 pulumi.Input 115 116 ToConfigMapPatchOutput() ConfigMapPatchOutput 117 ToConfigMapPatchOutputWithContext(ctx context.Context) ConfigMapPatchOutput 118 } 119 120 func (*ConfigMapPatch) ElementType() reflect.Type { 121 return reflect.TypeOf((**ConfigMapPatch)(nil)).Elem() 122 } 123 124 func (i *ConfigMapPatch) ToConfigMapPatchOutput() ConfigMapPatchOutput { 125 return i.ToConfigMapPatchOutputWithContext(context.Background()) 126 } 127 128 func (i *ConfigMapPatch) ToConfigMapPatchOutputWithContext(ctx context.Context) ConfigMapPatchOutput { 129 return pulumi.ToOutputWithContext(ctx, i).(ConfigMapPatchOutput) 130 } 131 132 // ConfigMapPatchArrayInput is an input type that accepts ConfigMapPatchArray and ConfigMapPatchArrayOutput values. 133 // You can construct a concrete instance of `ConfigMapPatchArrayInput` via: 134 // 135 // ConfigMapPatchArray{ ConfigMapPatchArgs{...} } 136 type ConfigMapPatchArrayInput interface { 137 pulumi.Input 138 139 ToConfigMapPatchArrayOutput() ConfigMapPatchArrayOutput 140 ToConfigMapPatchArrayOutputWithContext(context.Context) ConfigMapPatchArrayOutput 141 } 142 143 type ConfigMapPatchArray []ConfigMapPatchInput 144 145 func (ConfigMapPatchArray) ElementType() reflect.Type { 146 return reflect.TypeOf((*[]*ConfigMapPatch)(nil)).Elem() 147 } 148 149 func (i ConfigMapPatchArray) ToConfigMapPatchArrayOutput() ConfigMapPatchArrayOutput { 150 return i.ToConfigMapPatchArrayOutputWithContext(context.Background()) 151 } 152 153 func (i ConfigMapPatchArray) ToConfigMapPatchArrayOutputWithContext(ctx context.Context) ConfigMapPatchArrayOutput { 154 return pulumi.ToOutputWithContext(ctx, i).(ConfigMapPatchArrayOutput) 155 } 156 157 // ConfigMapPatchMapInput is an input type that accepts ConfigMapPatchMap and ConfigMapPatchMapOutput values. 158 // You can construct a concrete instance of `ConfigMapPatchMapInput` via: 159 // 160 // ConfigMapPatchMap{ "key": ConfigMapPatchArgs{...} } 161 type ConfigMapPatchMapInput interface { 162 pulumi.Input 163 164 ToConfigMapPatchMapOutput() ConfigMapPatchMapOutput 165 ToConfigMapPatchMapOutputWithContext(context.Context) ConfigMapPatchMapOutput 166 } 167 168 type ConfigMapPatchMap map[string]ConfigMapPatchInput 169 170 func (ConfigMapPatchMap) ElementType() reflect.Type { 171 return reflect.TypeOf((*map[string]*ConfigMapPatch)(nil)).Elem() 172 } 173 174 func (i ConfigMapPatchMap) ToConfigMapPatchMapOutput() ConfigMapPatchMapOutput { 175 return i.ToConfigMapPatchMapOutputWithContext(context.Background()) 176 } 177 178 func (i ConfigMapPatchMap) ToConfigMapPatchMapOutputWithContext(ctx context.Context) ConfigMapPatchMapOutput { 179 return pulumi.ToOutputWithContext(ctx, i).(ConfigMapPatchMapOutput) 180 } 181 182 type ConfigMapPatchOutput struct{ *pulumi.OutputState } 183 184 func (ConfigMapPatchOutput) ElementType() reflect.Type { 185 return reflect.TypeOf((**ConfigMapPatch)(nil)).Elem() 186 } 187 188 func (o ConfigMapPatchOutput) ToConfigMapPatchOutput() ConfigMapPatchOutput { 189 return o 190 } 191 192 func (o ConfigMapPatchOutput) ToConfigMapPatchOutputWithContext(ctx context.Context) ConfigMapPatchOutput { 193 return o 194 } 195 196 // 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 197 func (o ConfigMapPatchOutput) ApiVersion() pulumi.StringPtrOutput { 198 return o.ApplyT(func(v *ConfigMapPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 199 } 200 201 // BinaryData contains the binary data. Each key must consist of alphanumeric characters, '-', '_' or '.'. BinaryData can contain byte sequences that are not in the UTF-8 range. The keys stored in BinaryData must not overlap with the ones in the Data field, this is enforced during validation process. Using this field will require 1.10+ apiserver and kubelet. 202 func (o ConfigMapPatchOutput) BinaryData() pulumi.StringMapOutput { 203 return o.ApplyT(func(v *ConfigMapPatch) pulumi.StringMapOutput { return v.BinaryData }).(pulumi.StringMapOutput) 204 } 205 206 // Data contains the configuration data. Each key must consist of alphanumeric characters, '-', '_' or '.'. Values with non-UTF-8 byte sequences must use the BinaryData field. The keys stored in Data must not overlap with the keys in the BinaryData field, this is enforced during validation process. 207 func (o ConfigMapPatchOutput) Data() pulumi.StringMapOutput { 208 return o.ApplyT(func(v *ConfigMapPatch) pulumi.StringMapOutput { return v.Data }).(pulumi.StringMapOutput) 209 } 210 211 // Immutable, if set to true, ensures that data stored in the ConfigMap cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil. 212 func (o ConfigMapPatchOutput) Immutable() pulumi.BoolPtrOutput { 213 return o.ApplyT(func(v *ConfigMapPatch) pulumi.BoolPtrOutput { return v.Immutable }).(pulumi.BoolPtrOutput) 214 } 215 216 // 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 217 func (o ConfigMapPatchOutput) Kind() pulumi.StringPtrOutput { 218 return o.ApplyT(func(v *ConfigMapPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 219 } 220 221 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 222 func (o ConfigMapPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 223 return o.ApplyT(func(v *ConfigMapPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 224 } 225 226 type ConfigMapPatchArrayOutput struct{ *pulumi.OutputState } 227 228 func (ConfigMapPatchArrayOutput) ElementType() reflect.Type { 229 return reflect.TypeOf((*[]*ConfigMapPatch)(nil)).Elem() 230 } 231 232 func (o ConfigMapPatchArrayOutput) ToConfigMapPatchArrayOutput() ConfigMapPatchArrayOutput { 233 return o 234 } 235 236 func (o ConfigMapPatchArrayOutput) ToConfigMapPatchArrayOutputWithContext(ctx context.Context) ConfigMapPatchArrayOutput { 237 return o 238 } 239 240 func (o ConfigMapPatchArrayOutput) Index(i pulumi.IntInput) ConfigMapPatchOutput { 241 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ConfigMapPatch { 242 return vs[0].([]*ConfigMapPatch)[vs[1].(int)] 243 }).(ConfigMapPatchOutput) 244 } 245 246 type ConfigMapPatchMapOutput struct{ *pulumi.OutputState } 247 248 func (ConfigMapPatchMapOutput) ElementType() reflect.Type { 249 return reflect.TypeOf((*map[string]*ConfigMapPatch)(nil)).Elem() 250 } 251 252 func (o ConfigMapPatchMapOutput) ToConfigMapPatchMapOutput() ConfigMapPatchMapOutput { 253 return o 254 } 255 256 func (o ConfigMapPatchMapOutput) ToConfigMapPatchMapOutputWithContext(ctx context.Context) ConfigMapPatchMapOutput { 257 return o 258 } 259 260 func (o ConfigMapPatchMapOutput) MapIndex(k pulumi.StringInput) ConfigMapPatchOutput { 261 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ConfigMapPatch { 262 return vs[0].(map[string]*ConfigMapPatch)[vs[1].(string)] 263 }).(ConfigMapPatchOutput) 264 } 265 266 func init() { 267 pulumi.RegisterInputType(reflect.TypeOf((*ConfigMapPatchInput)(nil)).Elem(), &ConfigMapPatch{}) 268 pulumi.RegisterInputType(reflect.TypeOf((*ConfigMapPatchArrayInput)(nil)).Elem(), ConfigMapPatchArray{}) 269 pulumi.RegisterInputType(reflect.TypeOf((*ConfigMapPatchMapInput)(nil)).Elem(), ConfigMapPatchMap{}) 270 pulumi.RegisterOutputType(ConfigMapPatchOutput{}) 271 pulumi.RegisterOutputType(ConfigMapPatchArrayOutput{}) 272 pulumi.RegisterOutputType(ConfigMapPatchMapOutput{}) 273 }