github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/storage/v1beta1/storageClassPatch.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 corev1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/core/v1" 11 metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/meta/v1" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Patch resources are used to modify existing Kubernetes resources by using 16 // Server-Side Apply updates. The name of the resource must be specified, but all other properties are optional. More than 17 // one patch may be applied to the same resource, and a random FieldManager name will be used for each Patch resource. 18 // Conflicts will result in an error by default, but can be forced using the "pulumi.com/patchForce" annotation. See the 19 // [Server-Side Apply Docs](https://www.pulumi.com/registry/packages/kubernetes/how-to-guides/managing-resources-with-server-side-apply/) for 20 // additional information about using Server-Side Apply to manage Kubernetes resources with Pulumi. 21 // StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. 22 // 23 // StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name. 24 type StorageClassPatch struct { 25 pulumi.CustomResourceState 26 27 // AllowVolumeExpansion shows whether the storage class allow volume expand 28 AllowVolumeExpansion pulumi.BoolPtrOutput `pulumi:"allowVolumeExpansion"` 29 // Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature. 30 AllowedTopologies corev1.TopologySelectorTermPatchArrayOutput `pulumi:"allowedTopologies"` 31 // 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 32 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 33 // 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 34 Kind pulumi.StringPtrOutput `pulumi:"kind"` 35 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 36 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 37 // Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid. 38 MountOptions pulumi.StringArrayOutput `pulumi:"mountOptions"` 39 // Parameters holds the parameters for the provisioner that should create volumes of this storage class. 40 Parameters pulumi.StringMapOutput `pulumi:"parameters"` 41 // Provisioner indicates the type of the provisioner. 42 Provisioner pulumi.StringPtrOutput `pulumi:"provisioner"` 43 // Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete. 44 ReclaimPolicy pulumi.StringPtrOutput `pulumi:"reclaimPolicy"` 45 // VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature. 46 VolumeBindingMode pulumi.StringPtrOutput `pulumi:"volumeBindingMode"` 47 } 48 49 // NewStorageClassPatch registers a new resource with the given unique name, arguments, and options. 50 func NewStorageClassPatch(ctx *pulumi.Context, 51 name string, args *StorageClassPatchArgs, opts ...pulumi.ResourceOption) (*StorageClassPatch, error) { 52 if args == nil { 53 args = &StorageClassPatchArgs{} 54 } 55 56 args.ApiVersion = pulumi.StringPtr("storage.k8s.io/v1beta1") 57 args.Kind = pulumi.StringPtr("StorageClass") 58 aliases := pulumi.Aliases([]pulumi.Alias{ 59 { 60 Type: pulumi.String("kubernetes:storage.k8s.io/v1:StorageClassPatch"), 61 }, 62 }) 63 opts = append(opts, aliases) 64 var resource StorageClassPatch 65 err := ctx.RegisterResource("kubernetes:storage.k8s.io/v1beta1:StorageClassPatch", name, args, &resource, opts...) 66 if err != nil { 67 return nil, err 68 } 69 return &resource, nil 70 } 71 72 // GetStorageClassPatch gets an existing StorageClassPatch resource's state with the given name, ID, and optional 73 // state properties that are used to uniquely qualify the lookup (nil if not required). 74 func GetStorageClassPatch(ctx *pulumi.Context, 75 name string, id pulumi.IDInput, state *StorageClassPatchState, opts ...pulumi.ResourceOption) (*StorageClassPatch, error) { 76 var resource StorageClassPatch 77 err := ctx.ReadResource("kubernetes:storage.k8s.io/v1beta1:StorageClassPatch", name, id, state, &resource, opts...) 78 if err != nil { 79 return nil, err 80 } 81 return &resource, nil 82 } 83 84 // Input properties used for looking up and filtering StorageClassPatch resources. 85 type storageClassPatchState struct { 86 } 87 88 type StorageClassPatchState struct { 89 } 90 91 func (StorageClassPatchState) ElementType() reflect.Type { 92 return reflect.TypeOf((*storageClassPatchState)(nil)).Elem() 93 } 94 95 type storageClassPatchArgs struct { 96 // AllowVolumeExpansion shows whether the storage class allow volume expand 97 AllowVolumeExpansion *bool `pulumi:"allowVolumeExpansion"` 98 // Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature. 99 AllowedTopologies []corev1.TopologySelectorTermPatch `pulumi:"allowedTopologies"` 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 *string `pulumi:"apiVersion"` 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 *string `pulumi:"kind"` 104 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 105 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 106 // Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid. 107 MountOptions []string `pulumi:"mountOptions"` 108 // Parameters holds the parameters for the provisioner that should create volumes of this storage class. 109 Parameters map[string]string `pulumi:"parameters"` 110 // Provisioner indicates the type of the provisioner. 111 Provisioner *string `pulumi:"provisioner"` 112 // Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete. 113 ReclaimPolicy *string `pulumi:"reclaimPolicy"` 114 // VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature. 115 VolumeBindingMode *string `pulumi:"volumeBindingMode"` 116 } 117 118 // The set of arguments for constructing a StorageClassPatch resource. 119 type StorageClassPatchArgs struct { 120 // AllowVolumeExpansion shows whether the storage class allow volume expand 121 AllowVolumeExpansion pulumi.BoolPtrInput 122 // Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature. 123 AllowedTopologies corev1.TopologySelectorTermPatchArrayInput 124 // 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 125 ApiVersion pulumi.StringPtrInput 126 // 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 127 Kind pulumi.StringPtrInput 128 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 129 Metadata metav1.ObjectMetaPatchPtrInput 130 // Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid. 131 MountOptions pulumi.StringArrayInput 132 // Parameters holds the parameters for the provisioner that should create volumes of this storage class. 133 Parameters pulumi.StringMapInput 134 // Provisioner indicates the type of the provisioner. 135 Provisioner pulumi.StringPtrInput 136 // Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete. 137 ReclaimPolicy pulumi.StringPtrInput 138 // VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature. 139 VolumeBindingMode pulumi.StringPtrInput 140 } 141 142 func (StorageClassPatchArgs) ElementType() reflect.Type { 143 return reflect.TypeOf((*storageClassPatchArgs)(nil)).Elem() 144 } 145 146 type StorageClassPatchInput interface { 147 pulumi.Input 148 149 ToStorageClassPatchOutput() StorageClassPatchOutput 150 ToStorageClassPatchOutputWithContext(ctx context.Context) StorageClassPatchOutput 151 } 152 153 func (*StorageClassPatch) ElementType() reflect.Type { 154 return reflect.TypeOf((**StorageClassPatch)(nil)).Elem() 155 } 156 157 func (i *StorageClassPatch) ToStorageClassPatchOutput() StorageClassPatchOutput { 158 return i.ToStorageClassPatchOutputWithContext(context.Background()) 159 } 160 161 func (i *StorageClassPatch) ToStorageClassPatchOutputWithContext(ctx context.Context) StorageClassPatchOutput { 162 return pulumi.ToOutputWithContext(ctx, i).(StorageClassPatchOutput) 163 } 164 165 // StorageClassPatchArrayInput is an input type that accepts StorageClassPatchArray and StorageClassPatchArrayOutput values. 166 // You can construct a concrete instance of `StorageClassPatchArrayInput` via: 167 // 168 // StorageClassPatchArray{ StorageClassPatchArgs{...} } 169 type StorageClassPatchArrayInput interface { 170 pulumi.Input 171 172 ToStorageClassPatchArrayOutput() StorageClassPatchArrayOutput 173 ToStorageClassPatchArrayOutputWithContext(context.Context) StorageClassPatchArrayOutput 174 } 175 176 type StorageClassPatchArray []StorageClassPatchInput 177 178 func (StorageClassPatchArray) ElementType() reflect.Type { 179 return reflect.TypeOf((*[]*StorageClassPatch)(nil)).Elem() 180 } 181 182 func (i StorageClassPatchArray) ToStorageClassPatchArrayOutput() StorageClassPatchArrayOutput { 183 return i.ToStorageClassPatchArrayOutputWithContext(context.Background()) 184 } 185 186 func (i StorageClassPatchArray) ToStorageClassPatchArrayOutputWithContext(ctx context.Context) StorageClassPatchArrayOutput { 187 return pulumi.ToOutputWithContext(ctx, i).(StorageClassPatchArrayOutput) 188 } 189 190 // StorageClassPatchMapInput is an input type that accepts StorageClassPatchMap and StorageClassPatchMapOutput values. 191 // You can construct a concrete instance of `StorageClassPatchMapInput` via: 192 // 193 // StorageClassPatchMap{ "key": StorageClassPatchArgs{...} } 194 type StorageClassPatchMapInput interface { 195 pulumi.Input 196 197 ToStorageClassPatchMapOutput() StorageClassPatchMapOutput 198 ToStorageClassPatchMapOutputWithContext(context.Context) StorageClassPatchMapOutput 199 } 200 201 type StorageClassPatchMap map[string]StorageClassPatchInput 202 203 func (StorageClassPatchMap) ElementType() reflect.Type { 204 return reflect.TypeOf((*map[string]*StorageClassPatch)(nil)).Elem() 205 } 206 207 func (i StorageClassPatchMap) ToStorageClassPatchMapOutput() StorageClassPatchMapOutput { 208 return i.ToStorageClassPatchMapOutputWithContext(context.Background()) 209 } 210 211 func (i StorageClassPatchMap) ToStorageClassPatchMapOutputWithContext(ctx context.Context) StorageClassPatchMapOutput { 212 return pulumi.ToOutputWithContext(ctx, i).(StorageClassPatchMapOutput) 213 } 214 215 type StorageClassPatchOutput struct{ *pulumi.OutputState } 216 217 func (StorageClassPatchOutput) ElementType() reflect.Type { 218 return reflect.TypeOf((**StorageClassPatch)(nil)).Elem() 219 } 220 221 func (o StorageClassPatchOutput) ToStorageClassPatchOutput() StorageClassPatchOutput { 222 return o 223 } 224 225 func (o StorageClassPatchOutput) ToStorageClassPatchOutputWithContext(ctx context.Context) StorageClassPatchOutput { 226 return o 227 } 228 229 // AllowVolumeExpansion shows whether the storage class allow volume expand 230 func (o StorageClassPatchOutput) AllowVolumeExpansion() pulumi.BoolPtrOutput { 231 return o.ApplyT(func(v *StorageClassPatch) pulumi.BoolPtrOutput { return v.AllowVolumeExpansion }).(pulumi.BoolPtrOutput) 232 } 233 234 // Restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature. 235 func (o StorageClassPatchOutput) AllowedTopologies() corev1.TopologySelectorTermPatchArrayOutput { 236 return o.ApplyT(func(v *StorageClassPatch) corev1.TopologySelectorTermPatchArrayOutput { return v.AllowedTopologies }).(corev1.TopologySelectorTermPatchArrayOutput) 237 } 238 239 // 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 240 func (o StorageClassPatchOutput) ApiVersion() pulumi.StringPtrOutput { 241 return o.ApplyT(func(v *StorageClassPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 242 } 243 244 // 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 245 func (o StorageClassPatchOutput) Kind() pulumi.StringPtrOutput { 246 return o.ApplyT(func(v *StorageClassPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 247 } 248 249 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 250 func (o StorageClassPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 251 return o.ApplyT(func(v *StorageClassPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 252 } 253 254 // Dynamically provisioned PersistentVolumes of this storage class are created with these mountOptions, e.g. ["ro", "soft"]. Not validated - mount of the PVs will simply fail if one is invalid. 255 func (o StorageClassPatchOutput) MountOptions() pulumi.StringArrayOutput { 256 return o.ApplyT(func(v *StorageClassPatch) pulumi.StringArrayOutput { return v.MountOptions }).(pulumi.StringArrayOutput) 257 } 258 259 // Parameters holds the parameters for the provisioner that should create volumes of this storage class. 260 func (o StorageClassPatchOutput) Parameters() pulumi.StringMapOutput { 261 return o.ApplyT(func(v *StorageClassPatch) pulumi.StringMapOutput { return v.Parameters }).(pulumi.StringMapOutput) 262 } 263 264 // Provisioner indicates the type of the provisioner. 265 func (o StorageClassPatchOutput) Provisioner() pulumi.StringPtrOutput { 266 return o.ApplyT(func(v *StorageClassPatch) pulumi.StringPtrOutput { return v.Provisioner }).(pulumi.StringPtrOutput) 267 } 268 269 // Dynamically provisioned PersistentVolumes of this storage class are created with this reclaimPolicy. Defaults to Delete. 270 func (o StorageClassPatchOutput) ReclaimPolicy() pulumi.StringPtrOutput { 271 return o.ApplyT(func(v *StorageClassPatch) pulumi.StringPtrOutput { return v.ReclaimPolicy }).(pulumi.StringPtrOutput) 272 } 273 274 // VolumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature. 275 func (o StorageClassPatchOutput) VolumeBindingMode() pulumi.StringPtrOutput { 276 return o.ApplyT(func(v *StorageClassPatch) pulumi.StringPtrOutput { return v.VolumeBindingMode }).(pulumi.StringPtrOutput) 277 } 278 279 type StorageClassPatchArrayOutput struct{ *pulumi.OutputState } 280 281 func (StorageClassPatchArrayOutput) ElementType() reflect.Type { 282 return reflect.TypeOf((*[]*StorageClassPatch)(nil)).Elem() 283 } 284 285 func (o StorageClassPatchArrayOutput) ToStorageClassPatchArrayOutput() StorageClassPatchArrayOutput { 286 return o 287 } 288 289 func (o StorageClassPatchArrayOutput) ToStorageClassPatchArrayOutputWithContext(ctx context.Context) StorageClassPatchArrayOutput { 290 return o 291 } 292 293 func (o StorageClassPatchArrayOutput) Index(i pulumi.IntInput) StorageClassPatchOutput { 294 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StorageClassPatch { 295 return vs[0].([]*StorageClassPatch)[vs[1].(int)] 296 }).(StorageClassPatchOutput) 297 } 298 299 type StorageClassPatchMapOutput struct{ *pulumi.OutputState } 300 301 func (StorageClassPatchMapOutput) ElementType() reflect.Type { 302 return reflect.TypeOf((*map[string]*StorageClassPatch)(nil)).Elem() 303 } 304 305 func (o StorageClassPatchMapOutput) ToStorageClassPatchMapOutput() StorageClassPatchMapOutput { 306 return o 307 } 308 309 func (o StorageClassPatchMapOutput) ToStorageClassPatchMapOutputWithContext(ctx context.Context) StorageClassPatchMapOutput { 310 return o 311 } 312 313 func (o StorageClassPatchMapOutput) MapIndex(k pulumi.StringInput) StorageClassPatchOutput { 314 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StorageClassPatch { 315 return vs[0].(map[string]*StorageClassPatch)[vs[1].(string)] 316 }).(StorageClassPatchOutput) 317 } 318 319 func init() { 320 pulumi.RegisterInputType(reflect.TypeOf((*StorageClassPatchInput)(nil)).Elem(), &StorageClassPatch{}) 321 pulumi.RegisterInputType(reflect.TypeOf((*StorageClassPatchArrayInput)(nil)).Elem(), StorageClassPatchArray{}) 322 pulumi.RegisterInputType(reflect.TypeOf((*StorageClassPatchMapInput)(nil)).Elem(), StorageClassPatchMap{}) 323 pulumi.RegisterOutputType(StorageClassPatchOutput{}) 324 pulumi.RegisterOutputType(StorageClassPatchArrayOutput{}) 325 pulumi.RegisterOutputType(StorageClassPatchMapOutput{}) 326 }