github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/core/v1/configMap.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 // ConfigMap holds configuration data for pods to consume. 15 type ConfigMap struct { 16 pulumi.CustomResourceState 17 18 // 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 19 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 20 // 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. 21 BinaryData pulumi.StringMapOutput `pulumi:"binaryData"` 22 // 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. 23 Data pulumi.StringMapOutput `pulumi:"data"` 24 // 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. 25 Immutable pulumi.BoolPtrOutput `pulumi:"immutable"` 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.ObjectMetaPtrOutput `pulumi:"metadata"` 30 } 31 32 // NewConfigMap registers a new resource with the given unique name, arguments, and options. 33 func NewConfigMap(ctx *pulumi.Context, 34 name string, args *ConfigMapArgs, opts ...pulumi.ResourceOption) (*ConfigMap, error) { 35 if args == nil { 36 args = &ConfigMapArgs{} 37 } 38 39 args.ApiVersion = pulumi.StringPtr("v1") 40 args.Kind = pulumi.StringPtr("ConfigMap") 41 var resource ConfigMap 42 err := ctx.RegisterResource("kubernetes:core/v1:ConfigMap", name, args, &resource, opts...) 43 if err != nil { 44 return nil, err 45 } 46 return &resource, nil 47 } 48 49 // GetConfigMap gets an existing ConfigMap resource's state with the given name, ID, and optional 50 // state properties that are used to uniquely qualify the lookup (nil if not required). 51 func GetConfigMap(ctx *pulumi.Context, 52 name string, id pulumi.IDInput, state *ConfigMapState, opts ...pulumi.ResourceOption) (*ConfigMap, error) { 53 var resource ConfigMap 54 err := ctx.ReadResource("kubernetes:core/v1:ConfigMap", name, id, state, &resource, opts...) 55 if err != nil { 56 return nil, err 57 } 58 return &resource, nil 59 } 60 61 // Input properties used for looking up and filtering ConfigMap resources. 62 type configMapState struct { 63 } 64 65 type ConfigMapState struct { 66 } 67 68 func (ConfigMapState) ElementType() reflect.Type { 69 return reflect.TypeOf((*configMapState)(nil)).Elem() 70 } 71 72 type configMapArgs struct { 73 // 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 74 ApiVersion *string `pulumi:"apiVersion"` 75 // 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. 76 BinaryData map[string]string `pulumi:"binaryData"` 77 // 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. 78 Data map[string]string `pulumi:"data"` 79 // 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. 80 Immutable *bool `pulumi:"immutable"` 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's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 84 Metadata *metav1.ObjectMeta `pulumi:"metadata"` 85 } 86 87 // The set of arguments for constructing a ConfigMap resource. 88 type ConfigMapArgs struct { 89 // 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 90 ApiVersion pulumi.StringPtrInput 91 // 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. 92 BinaryData pulumi.StringMapInput 93 // 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. 94 Data pulumi.StringMapInput 95 // 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. 96 Immutable pulumi.BoolPtrInput 97 // 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 98 Kind pulumi.StringPtrInput 99 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 100 Metadata metav1.ObjectMetaPtrInput 101 } 102 103 func (ConfigMapArgs) ElementType() reflect.Type { 104 return reflect.TypeOf((*configMapArgs)(nil)).Elem() 105 } 106 107 type ConfigMapInput interface { 108 pulumi.Input 109 110 ToConfigMapOutput() ConfigMapOutput 111 ToConfigMapOutputWithContext(ctx context.Context) ConfigMapOutput 112 } 113 114 func (*ConfigMap) ElementType() reflect.Type { 115 return reflect.TypeOf((**ConfigMap)(nil)).Elem() 116 } 117 118 func (i *ConfigMap) ToConfigMapOutput() ConfigMapOutput { 119 return i.ToConfigMapOutputWithContext(context.Background()) 120 } 121 122 func (i *ConfigMap) ToConfigMapOutputWithContext(ctx context.Context) ConfigMapOutput { 123 return pulumi.ToOutputWithContext(ctx, i).(ConfigMapOutput) 124 } 125 126 // ConfigMapArrayInput is an input type that accepts ConfigMapArray and ConfigMapArrayOutput values. 127 // You can construct a concrete instance of `ConfigMapArrayInput` via: 128 // 129 // ConfigMapArray{ ConfigMapArgs{...} } 130 type ConfigMapArrayInput interface { 131 pulumi.Input 132 133 ToConfigMapArrayOutput() ConfigMapArrayOutput 134 ToConfigMapArrayOutputWithContext(context.Context) ConfigMapArrayOutput 135 } 136 137 type ConfigMapArray []ConfigMapInput 138 139 func (ConfigMapArray) ElementType() reflect.Type { 140 return reflect.TypeOf((*[]*ConfigMap)(nil)).Elem() 141 } 142 143 func (i ConfigMapArray) ToConfigMapArrayOutput() ConfigMapArrayOutput { 144 return i.ToConfigMapArrayOutputWithContext(context.Background()) 145 } 146 147 func (i ConfigMapArray) ToConfigMapArrayOutputWithContext(ctx context.Context) ConfigMapArrayOutput { 148 return pulumi.ToOutputWithContext(ctx, i).(ConfigMapArrayOutput) 149 } 150 151 // ConfigMapMapInput is an input type that accepts ConfigMapMap and ConfigMapMapOutput values. 152 // You can construct a concrete instance of `ConfigMapMapInput` via: 153 // 154 // ConfigMapMap{ "key": ConfigMapArgs{...} } 155 type ConfigMapMapInput interface { 156 pulumi.Input 157 158 ToConfigMapMapOutput() ConfigMapMapOutput 159 ToConfigMapMapOutputWithContext(context.Context) ConfigMapMapOutput 160 } 161 162 type ConfigMapMap map[string]ConfigMapInput 163 164 func (ConfigMapMap) ElementType() reflect.Type { 165 return reflect.TypeOf((*map[string]*ConfigMap)(nil)).Elem() 166 } 167 168 func (i ConfigMapMap) ToConfigMapMapOutput() ConfigMapMapOutput { 169 return i.ToConfigMapMapOutputWithContext(context.Background()) 170 } 171 172 func (i ConfigMapMap) ToConfigMapMapOutputWithContext(ctx context.Context) ConfigMapMapOutput { 173 return pulumi.ToOutputWithContext(ctx, i).(ConfigMapMapOutput) 174 } 175 176 type ConfigMapOutput struct{ *pulumi.OutputState } 177 178 func (ConfigMapOutput) ElementType() reflect.Type { 179 return reflect.TypeOf((**ConfigMap)(nil)).Elem() 180 } 181 182 func (o ConfigMapOutput) ToConfigMapOutput() ConfigMapOutput { 183 return o 184 } 185 186 func (o ConfigMapOutput) ToConfigMapOutputWithContext(ctx context.Context) ConfigMapOutput { 187 return o 188 } 189 190 // 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 191 func (o ConfigMapOutput) ApiVersion() pulumi.StringPtrOutput { 192 return o.ApplyT(func(v *ConfigMap) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 193 } 194 195 // 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. 196 func (o ConfigMapOutput) BinaryData() pulumi.StringMapOutput { 197 return o.ApplyT(func(v *ConfigMap) pulumi.StringMapOutput { return v.BinaryData }).(pulumi.StringMapOutput) 198 } 199 200 // 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. 201 func (o ConfigMapOutput) Data() pulumi.StringMapOutput { 202 return o.ApplyT(func(v *ConfigMap) pulumi.StringMapOutput { return v.Data }).(pulumi.StringMapOutput) 203 } 204 205 // 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. 206 func (o ConfigMapOutput) Immutable() pulumi.BoolPtrOutput { 207 return o.ApplyT(func(v *ConfigMap) pulumi.BoolPtrOutput { return v.Immutable }).(pulumi.BoolPtrOutput) 208 } 209 210 // 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 211 func (o ConfigMapOutput) Kind() pulumi.StringPtrOutput { 212 return o.ApplyT(func(v *ConfigMap) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 213 } 214 215 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 216 func (o ConfigMapOutput) Metadata() metav1.ObjectMetaPtrOutput { 217 return o.ApplyT(func(v *ConfigMap) metav1.ObjectMetaPtrOutput { return v.Metadata }).(metav1.ObjectMetaPtrOutput) 218 } 219 220 type ConfigMapArrayOutput struct{ *pulumi.OutputState } 221 222 func (ConfigMapArrayOutput) ElementType() reflect.Type { 223 return reflect.TypeOf((*[]*ConfigMap)(nil)).Elem() 224 } 225 226 func (o ConfigMapArrayOutput) ToConfigMapArrayOutput() ConfigMapArrayOutput { 227 return o 228 } 229 230 func (o ConfigMapArrayOutput) ToConfigMapArrayOutputWithContext(ctx context.Context) ConfigMapArrayOutput { 231 return o 232 } 233 234 func (o ConfigMapArrayOutput) Index(i pulumi.IntInput) ConfigMapOutput { 235 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ConfigMap { 236 return vs[0].([]*ConfigMap)[vs[1].(int)] 237 }).(ConfigMapOutput) 238 } 239 240 type ConfigMapMapOutput struct{ *pulumi.OutputState } 241 242 func (ConfigMapMapOutput) ElementType() reflect.Type { 243 return reflect.TypeOf((*map[string]*ConfigMap)(nil)).Elem() 244 } 245 246 func (o ConfigMapMapOutput) ToConfigMapMapOutput() ConfigMapMapOutput { 247 return o 248 } 249 250 func (o ConfigMapMapOutput) ToConfigMapMapOutputWithContext(ctx context.Context) ConfigMapMapOutput { 251 return o 252 } 253 254 func (o ConfigMapMapOutput) MapIndex(k pulumi.StringInput) ConfigMapOutput { 255 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ConfigMap { 256 return vs[0].(map[string]*ConfigMap)[vs[1].(string)] 257 }).(ConfigMapOutput) 258 } 259 260 func init() { 261 pulumi.RegisterInputType(reflect.TypeOf((*ConfigMapInput)(nil)).Elem(), &ConfigMap{}) 262 pulumi.RegisterInputType(reflect.TypeOf((*ConfigMapArrayInput)(nil)).Elem(), ConfigMapArray{}) 263 pulumi.RegisterInputType(reflect.TypeOf((*ConfigMapMapInput)(nil)).Elem(), ConfigMapMap{}) 264 pulumi.RegisterOutputType(ConfigMapOutput{}) 265 pulumi.RegisterOutputType(ConfigMapArrayOutput{}) 266 pulumi.RegisterOutputType(ConfigMapMapOutput{}) 267 }