github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/core/v1/persistentVolumePatch.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 // PersistentVolume (PV) is a storage resource provisioned by an administrator. It is analogous to a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes 21 type PersistentVolumePatch 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 // spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes 31 Spec PersistentVolumeSpecPatchPtrOutput `pulumi:"spec"` 32 // status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes 33 Status PersistentVolumeStatusPatchPtrOutput `pulumi:"status"` 34 } 35 36 // NewPersistentVolumePatch registers a new resource with the given unique name, arguments, and options. 37 func NewPersistentVolumePatch(ctx *pulumi.Context, 38 name string, args *PersistentVolumePatchArgs, opts ...pulumi.ResourceOption) (*PersistentVolumePatch, error) { 39 if args == nil { 40 args = &PersistentVolumePatchArgs{} 41 } 42 43 args.ApiVersion = pulumi.StringPtr("v1") 44 args.Kind = pulumi.StringPtr("PersistentVolume") 45 var resource PersistentVolumePatch 46 err := ctx.RegisterResource("kubernetes:core/v1:PersistentVolumePatch", name, args, &resource, opts...) 47 if err != nil { 48 return nil, err 49 } 50 return &resource, nil 51 } 52 53 // GetPersistentVolumePatch gets an existing PersistentVolumePatch resource's state with the given name, ID, and optional 54 // state properties that are used to uniquely qualify the lookup (nil if not required). 55 func GetPersistentVolumePatch(ctx *pulumi.Context, 56 name string, id pulumi.IDInput, state *PersistentVolumePatchState, opts ...pulumi.ResourceOption) (*PersistentVolumePatch, error) { 57 var resource PersistentVolumePatch 58 err := ctx.ReadResource("kubernetes:core/v1:PersistentVolumePatch", name, id, state, &resource, opts...) 59 if err != nil { 60 return nil, err 61 } 62 return &resource, nil 63 } 64 65 // Input properties used for looking up and filtering PersistentVolumePatch resources. 66 type persistentVolumePatchState struct { 67 } 68 69 type PersistentVolumePatchState struct { 70 } 71 72 func (PersistentVolumePatchState) ElementType() reflect.Type { 73 return reflect.TypeOf((*persistentVolumePatchState)(nil)).Elem() 74 } 75 76 type persistentVolumePatchArgs struct { 77 // 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 78 ApiVersion *string `pulumi:"apiVersion"` 79 // 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 80 Kind *string `pulumi:"kind"` 81 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 82 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 83 // spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes 84 Spec *PersistentVolumeSpecPatch `pulumi:"spec"` 85 } 86 87 // The set of arguments for constructing a PersistentVolumePatch resource. 88 type PersistentVolumePatchArgs 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 // 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 92 Kind pulumi.StringPtrInput 93 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 94 Metadata metav1.ObjectMetaPatchPtrInput 95 // spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes 96 Spec PersistentVolumeSpecPatchPtrInput 97 } 98 99 func (PersistentVolumePatchArgs) ElementType() reflect.Type { 100 return reflect.TypeOf((*persistentVolumePatchArgs)(nil)).Elem() 101 } 102 103 type PersistentVolumePatchInput interface { 104 pulumi.Input 105 106 ToPersistentVolumePatchOutput() PersistentVolumePatchOutput 107 ToPersistentVolumePatchOutputWithContext(ctx context.Context) PersistentVolumePatchOutput 108 } 109 110 func (*PersistentVolumePatch) ElementType() reflect.Type { 111 return reflect.TypeOf((**PersistentVolumePatch)(nil)).Elem() 112 } 113 114 func (i *PersistentVolumePatch) ToPersistentVolumePatchOutput() PersistentVolumePatchOutput { 115 return i.ToPersistentVolumePatchOutputWithContext(context.Background()) 116 } 117 118 func (i *PersistentVolumePatch) ToPersistentVolumePatchOutputWithContext(ctx context.Context) PersistentVolumePatchOutput { 119 return pulumi.ToOutputWithContext(ctx, i).(PersistentVolumePatchOutput) 120 } 121 122 // PersistentVolumePatchArrayInput is an input type that accepts PersistentVolumePatchArray and PersistentVolumePatchArrayOutput values. 123 // You can construct a concrete instance of `PersistentVolumePatchArrayInput` via: 124 // 125 // PersistentVolumePatchArray{ PersistentVolumePatchArgs{...} } 126 type PersistentVolumePatchArrayInput interface { 127 pulumi.Input 128 129 ToPersistentVolumePatchArrayOutput() PersistentVolumePatchArrayOutput 130 ToPersistentVolumePatchArrayOutputWithContext(context.Context) PersistentVolumePatchArrayOutput 131 } 132 133 type PersistentVolumePatchArray []PersistentVolumePatchInput 134 135 func (PersistentVolumePatchArray) ElementType() reflect.Type { 136 return reflect.TypeOf((*[]*PersistentVolumePatch)(nil)).Elem() 137 } 138 139 func (i PersistentVolumePatchArray) ToPersistentVolumePatchArrayOutput() PersistentVolumePatchArrayOutput { 140 return i.ToPersistentVolumePatchArrayOutputWithContext(context.Background()) 141 } 142 143 func (i PersistentVolumePatchArray) ToPersistentVolumePatchArrayOutputWithContext(ctx context.Context) PersistentVolumePatchArrayOutput { 144 return pulumi.ToOutputWithContext(ctx, i).(PersistentVolumePatchArrayOutput) 145 } 146 147 // PersistentVolumePatchMapInput is an input type that accepts PersistentVolumePatchMap and PersistentVolumePatchMapOutput values. 148 // You can construct a concrete instance of `PersistentVolumePatchMapInput` via: 149 // 150 // PersistentVolumePatchMap{ "key": PersistentVolumePatchArgs{...} } 151 type PersistentVolumePatchMapInput interface { 152 pulumi.Input 153 154 ToPersistentVolumePatchMapOutput() PersistentVolumePatchMapOutput 155 ToPersistentVolumePatchMapOutputWithContext(context.Context) PersistentVolumePatchMapOutput 156 } 157 158 type PersistentVolumePatchMap map[string]PersistentVolumePatchInput 159 160 func (PersistentVolumePatchMap) ElementType() reflect.Type { 161 return reflect.TypeOf((*map[string]*PersistentVolumePatch)(nil)).Elem() 162 } 163 164 func (i PersistentVolumePatchMap) ToPersistentVolumePatchMapOutput() PersistentVolumePatchMapOutput { 165 return i.ToPersistentVolumePatchMapOutputWithContext(context.Background()) 166 } 167 168 func (i PersistentVolumePatchMap) ToPersistentVolumePatchMapOutputWithContext(ctx context.Context) PersistentVolumePatchMapOutput { 169 return pulumi.ToOutputWithContext(ctx, i).(PersistentVolumePatchMapOutput) 170 } 171 172 type PersistentVolumePatchOutput struct{ *pulumi.OutputState } 173 174 func (PersistentVolumePatchOutput) ElementType() reflect.Type { 175 return reflect.TypeOf((**PersistentVolumePatch)(nil)).Elem() 176 } 177 178 func (o PersistentVolumePatchOutput) ToPersistentVolumePatchOutput() PersistentVolumePatchOutput { 179 return o 180 } 181 182 func (o PersistentVolumePatchOutput) ToPersistentVolumePatchOutputWithContext(ctx context.Context) PersistentVolumePatchOutput { 183 return o 184 } 185 186 // 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 187 func (o PersistentVolumePatchOutput) ApiVersion() pulumi.StringPtrOutput { 188 return o.ApplyT(func(v *PersistentVolumePatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 189 } 190 191 // 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 192 func (o PersistentVolumePatchOutput) Kind() pulumi.StringPtrOutput { 193 return o.ApplyT(func(v *PersistentVolumePatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 194 } 195 196 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 197 func (o PersistentVolumePatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 198 return o.ApplyT(func(v *PersistentVolumePatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 199 } 200 201 // spec defines a specification of a persistent volume owned by the cluster. Provisioned by an administrator. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes 202 func (o PersistentVolumePatchOutput) Spec() PersistentVolumeSpecPatchPtrOutput { 203 return o.ApplyT(func(v *PersistentVolumePatch) PersistentVolumeSpecPatchPtrOutput { return v.Spec }).(PersistentVolumeSpecPatchPtrOutput) 204 } 205 206 // status represents the current information/status for the persistent volume. Populated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistent-volumes 207 func (o PersistentVolumePatchOutput) Status() PersistentVolumeStatusPatchPtrOutput { 208 return o.ApplyT(func(v *PersistentVolumePatch) PersistentVolumeStatusPatchPtrOutput { return v.Status }).(PersistentVolumeStatusPatchPtrOutput) 209 } 210 211 type PersistentVolumePatchArrayOutput struct{ *pulumi.OutputState } 212 213 func (PersistentVolumePatchArrayOutput) ElementType() reflect.Type { 214 return reflect.TypeOf((*[]*PersistentVolumePatch)(nil)).Elem() 215 } 216 217 func (o PersistentVolumePatchArrayOutput) ToPersistentVolumePatchArrayOutput() PersistentVolumePatchArrayOutput { 218 return o 219 } 220 221 func (o PersistentVolumePatchArrayOutput) ToPersistentVolumePatchArrayOutputWithContext(ctx context.Context) PersistentVolumePatchArrayOutput { 222 return o 223 } 224 225 func (o PersistentVolumePatchArrayOutput) Index(i pulumi.IntInput) PersistentVolumePatchOutput { 226 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PersistentVolumePatch { 227 return vs[0].([]*PersistentVolumePatch)[vs[1].(int)] 228 }).(PersistentVolumePatchOutput) 229 } 230 231 type PersistentVolumePatchMapOutput struct{ *pulumi.OutputState } 232 233 func (PersistentVolumePatchMapOutput) ElementType() reflect.Type { 234 return reflect.TypeOf((*map[string]*PersistentVolumePatch)(nil)).Elem() 235 } 236 237 func (o PersistentVolumePatchMapOutput) ToPersistentVolumePatchMapOutput() PersistentVolumePatchMapOutput { 238 return o 239 } 240 241 func (o PersistentVolumePatchMapOutput) ToPersistentVolumePatchMapOutputWithContext(ctx context.Context) PersistentVolumePatchMapOutput { 242 return o 243 } 244 245 func (o PersistentVolumePatchMapOutput) MapIndex(k pulumi.StringInput) PersistentVolumePatchOutput { 246 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PersistentVolumePatch { 247 return vs[0].(map[string]*PersistentVolumePatch)[vs[1].(string)] 248 }).(PersistentVolumePatchOutput) 249 } 250 251 func init() { 252 pulumi.RegisterInputType(reflect.TypeOf((*PersistentVolumePatchInput)(nil)).Elem(), &PersistentVolumePatch{}) 253 pulumi.RegisterInputType(reflect.TypeOf((*PersistentVolumePatchArrayInput)(nil)).Elem(), PersistentVolumePatchArray{}) 254 pulumi.RegisterInputType(reflect.TypeOf((*PersistentVolumePatchMapInput)(nil)).Elem(), PersistentVolumePatchMap{}) 255 pulumi.RegisterOutputType(PersistentVolumePatchOutput{}) 256 pulumi.RegisterOutputType(PersistentVolumePatchArrayOutput{}) 257 pulumi.RegisterOutputType(PersistentVolumePatchMapOutput{}) 258 }