github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/core/v1/persistentVolumeClaimPatch.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  // PersistentVolumeClaim is a user's request for and claim to a persistent volume
    21  type PersistentVolumeClaimPatch 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 the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
    31  	Spec PersistentVolumeClaimSpecPatchPtrOutput `pulumi:"spec"`
    32  	// status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
    33  	Status PersistentVolumeClaimStatusPatchPtrOutput `pulumi:"status"`
    34  }
    35  
    36  // NewPersistentVolumeClaimPatch registers a new resource with the given unique name, arguments, and options.
    37  func NewPersistentVolumeClaimPatch(ctx *pulumi.Context,
    38  	name string, args *PersistentVolumeClaimPatchArgs, opts ...pulumi.ResourceOption) (*PersistentVolumeClaimPatch, error) {
    39  	if args == nil {
    40  		args = &PersistentVolumeClaimPatchArgs{}
    41  	}
    42  
    43  	args.ApiVersion = pulumi.StringPtr("v1")
    44  	args.Kind = pulumi.StringPtr("PersistentVolumeClaim")
    45  	var resource PersistentVolumeClaimPatch
    46  	err := ctx.RegisterResource("kubernetes:core/v1:PersistentVolumeClaimPatch", name, args, &resource, opts...)
    47  	if err != nil {
    48  		return nil, err
    49  	}
    50  	return &resource, nil
    51  }
    52  
    53  // GetPersistentVolumeClaimPatch gets an existing PersistentVolumeClaimPatch 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 GetPersistentVolumeClaimPatch(ctx *pulumi.Context,
    56  	name string, id pulumi.IDInput, state *PersistentVolumeClaimPatchState, opts ...pulumi.ResourceOption) (*PersistentVolumeClaimPatch, error) {
    57  	var resource PersistentVolumeClaimPatch
    58  	err := ctx.ReadResource("kubernetes:core/v1:PersistentVolumeClaimPatch", 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 PersistentVolumeClaimPatch resources.
    66  type persistentVolumeClaimPatchState struct {
    67  }
    68  
    69  type PersistentVolumeClaimPatchState struct {
    70  }
    71  
    72  func (PersistentVolumeClaimPatchState) ElementType() reflect.Type {
    73  	return reflect.TypeOf((*persistentVolumeClaimPatchState)(nil)).Elem()
    74  }
    75  
    76  type persistentVolumeClaimPatchArgs 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 the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
    84  	Spec *PersistentVolumeClaimSpecPatch `pulumi:"spec"`
    85  }
    86  
    87  // The set of arguments for constructing a PersistentVolumeClaimPatch resource.
    88  type PersistentVolumeClaimPatchArgs 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 the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
    96  	Spec PersistentVolumeClaimSpecPatchPtrInput
    97  }
    98  
    99  func (PersistentVolumeClaimPatchArgs) ElementType() reflect.Type {
   100  	return reflect.TypeOf((*persistentVolumeClaimPatchArgs)(nil)).Elem()
   101  }
   102  
   103  type PersistentVolumeClaimPatchInput interface {
   104  	pulumi.Input
   105  
   106  	ToPersistentVolumeClaimPatchOutput() PersistentVolumeClaimPatchOutput
   107  	ToPersistentVolumeClaimPatchOutputWithContext(ctx context.Context) PersistentVolumeClaimPatchOutput
   108  }
   109  
   110  func (*PersistentVolumeClaimPatch) ElementType() reflect.Type {
   111  	return reflect.TypeOf((**PersistentVolumeClaimPatch)(nil)).Elem()
   112  }
   113  
   114  func (i *PersistentVolumeClaimPatch) ToPersistentVolumeClaimPatchOutput() PersistentVolumeClaimPatchOutput {
   115  	return i.ToPersistentVolumeClaimPatchOutputWithContext(context.Background())
   116  }
   117  
   118  func (i *PersistentVolumeClaimPatch) ToPersistentVolumeClaimPatchOutputWithContext(ctx context.Context) PersistentVolumeClaimPatchOutput {
   119  	return pulumi.ToOutputWithContext(ctx, i).(PersistentVolumeClaimPatchOutput)
   120  }
   121  
   122  // PersistentVolumeClaimPatchArrayInput is an input type that accepts PersistentVolumeClaimPatchArray and PersistentVolumeClaimPatchArrayOutput values.
   123  // You can construct a concrete instance of `PersistentVolumeClaimPatchArrayInput` via:
   124  //
   125  //	PersistentVolumeClaimPatchArray{ PersistentVolumeClaimPatchArgs{...} }
   126  type PersistentVolumeClaimPatchArrayInput interface {
   127  	pulumi.Input
   128  
   129  	ToPersistentVolumeClaimPatchArrayOutput() PersistentVolumeClaimPatchArrayOutput
   130  	ToPersistentVolumeClaimPatchArrayOutputWithContext(context.Context) PersistentVolumeClaimPatchArrayOutput
   131  }
   132  
   133  type PersistentVolumeClaimPatchArray []PersistentVolumeClaimPatchInput
   134  
   135  func (PersistentVolumeClaimPatchArray) ElementType() reflect.Type {
   136  	return reflect.TypeOf((*[]*PersistentVolumeClaimPatch)(nil)).Elem()
   137  }
   138  
   139  func (i PersistentVolumeClaimPatchArray) ToPersistentVolumeClaimPatchArrayOutput() PersistentVolumeClaimPatchArrayOutput {
   140  	return i.ToPersistentVolumeClaimPatchArrayOutputWithContext(context.Background())
   141  }
   142  
   143  func (i PersistentVolumeClaimPatchArray) ToPersistentVolumeClaimPatchArrayOutputWithContext(ctx context.Context) PersistentVolumeClaimPatchArrayOutput {
   144  	return pulumi.ToOutputWithContext(ctx, i).(PersistentVolumeClaimPatchArrayOutput)
   145  }
   146  
   147  // PersistentVolumeClaimPatchMapInput is an input type that accepts PersistentVolumeClaimPatchMap and PersistentVolumeClaimPatchMapOutput values.
   148  // You can construct a concrete instance of `PersistentVolumeClaimPatchMapInput` via:
   149  //
   150  //	PersistentVolumeClaimPatchMap{ "key": PersistentVolumeClaimPatchArgs{...} }
   151  type PersistentVolumeClaimPatchMapInput interface {
   152  	pulumi.Input
   153  
   154  	ToPersistentVolumeClaimPatchMapOutput() PersistentVolumeClaimPatchMapOutput
   155  	ToPersistentVolumeClaimPatchMapOutputWithContext(context.Context) PersistentVolumeClaimPatchMapOutput
   156  }
   157  
   158  type PersistentVolumeClaimPatchMap map[string]PersistentVolumeClaimPatchInput
   159  
   160  func (PersistentVolumeClaimPatchMap) ElementType() reflect.Type {
   161  	return reflect.TypeOf((*map[string]*PersistentVolumeClaimPatch)(nil)).Elem()
   162  }
   163  
   164  func (i PersistentVolumeClaimPatchMap) ToPersistentVolumeClaimPatchMapOutput() PersistentVolumeClaimPatchMapOutput {
   165  	return i.ToPersistentVolumeClaimPatchMapOutputWithContext(context.Background())
   166  }
   167  
   168  func (i PersistentVolumeClaimPatchMap) ToPersistentVolumeClaimPatchMapOutputWithContext(ctx context.Context) PersistentVolumeClaimPatchMapOutput {
   169  	return pulumi.ToOutputWithContext(ctx, i).(PersistentVolumeClaimPatchMapOutput)
   170  }
   171  
   172  type PersistentVolumeClaimPatchOutput struct{ *pulumi.OutputState }
   173  
   174  func (PersistentVolumeClaimPatchOutput) ElementType() reflect.Type {
   175  	return reflect.TypeOf((**PersistentVolumeClaimPatch)(nil)).Elem()
   176  }
   177  
   178  func (o PersistentVolumeClaimPatchOutput) ToPersistentVolumeClaimPatchOutput() PersistentVolumeClaimPatchOutput {
   179  	return o
   180  }
   181  
   182  func (o PersistentVolumeClaimPatchOutput) ToPersistentVolumeClaimPatchOutputWithContext(ctx context.Context) PersistentVolumeClaimPatchOutput {
   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 PersistentVolumeClaimPatchOutput) ApiVersion() pulumi.StringPtrOutput {
   188  	return o.ApplyT(func(v *PersistentVolumeClaimPatch) 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 PersistentVolumeClaimPatchOutput) Kind() pulumi.StringPtrOutput {
   193  	return o.ApplyT(func(v *PersistentVolumeClaimPatch) 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 PersistentVolumeClaimPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput {
   198  	return o.ApplyT(func(v *PersistentVolumeClaimPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput)
   199  }
   200  
   201  // spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
   202  func (o PersistentVolumeClaimPatchOutput) Spec() PersistentVolumeClaimSpecPatchPtrOutput {
   203  	return o.ApplyT(func(v *PersistentVolumeClaimPatch) PersistentVolumeClaimSpecPatchPtrOutput { return v.Spec }).(PersistentVolumeClaimSpecPatchPtrOutput)
   204  }
   205  
   206  // status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
   207  func (o PersistentVolumeClaimPatchOutput) Status() PersistentVolumeClaimStatusPatchPtrOutput {
   208  	return o.ApplyT(func(v *PersistentVolumeClaimPatch) PersistentVolumeClaimStatusPatchPtrOutput { return v.Status }).(PersistentVolumeClaimStatusPatchPtrOutput)
   209  }
   210  
   211  type PersistentVolumeClaimPatchArrayOutput struct{ *pulumi.OutputState }
   212  
   213  func (PersistentVolumeClaimPatchArrayOutput) ElementType() reflect.Type {
   214  	return reflect.TypeOf((*[]*PersistentVolumeClaimPatch)(nil)).Elem()
   215  }
   216  
   217  func (o PersistentVolumeClaimPatchArrayOutput) ToPersistentVolumeClaimPatchArrayOutput() PersistentVolumeClaimPatchArrayOutput {
   218  	return o
   219  }
   220  
   221  func (o PersistentVolumeClaimPatchArrayOutput) ToPersistentVolumeClaimPatchArrayOutputWithContext(ctx context.Context) PersistentVolumeClaimPatchArrayOutput {
   222  	return o
   223  }
   224  
   225  func (o PersistentVolumeClaimPatchArrayOutput) Index(i pulumi.IntInput) PersistentVolumeClaimPatchOutput {
   226  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PersistentVolumeClaimPatch {
   227  		return vs[0].([]*PersistentVolumeClaimPatch)[vs[1].(int)]
   228  	}).(PersistentVolumeClaimPatchOutput)
   229  }
   230  
   231  type PersistentVolumeClaimPatchMapOutput struct{ *pulumi.OutputState }
   232  
   233  func (PersistentVolumeClaimPatchMapOutput) ElementType() reflect.Type {
   234  	return reflect.TypeOf((*map[string]*PersistentVolumeClaimPatch)(nil)).Elem()
   235  }
   236  
   237  func (o PersistentVolumeClaimPatchMapOutput) ToPersistentVolumeClaimPatchMapOutput() PersistentVolumeClaimPatchMapOutput {
   238  	return o
   239  }
   240  
   241  func (o PersistentVolumeClaimPatchMapOutput) ToPersistentVolumeClaimPatchMapOutputWithContext(ctx context.Context) PersistentVolumeClaimPatchMapOutput {
   242  	return o
   243  }
   244  
   245  func (o PersistentVolumeClaimPatchMapOutput) MapIndex(k pulumi.StringInput) PersistentVolumeClaimPatchOutput {
   246  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PersistentVolumeClaimPatch {
   247  		return vs[0].(map[string]*PersistentVolumeClaimPatch)[vs[1].(string)]
   248  	}).(PersistentVolumeClaimPatchOutput)
   249  }
   250  
   251  func init() {
   252  	pulumi.RegisterInputType(reflect.TypeOf((*PersistentVolumeClaimPatchInput)(nil)).Elem(), &PersistentVolumeClaimPatch{})
   253  	pulumi.RegisterInputType(reflect.TypeOf((*PersistentVolumeClaimPatchArrayInput)(nil)).Elem(), PersistentVolumeClaimPatchArray{})
   254  	pulumi.RegisterInputType(reflect.TypeOf((*PersistentVolumeClaimPatchMapInput)(nil)).Elem(), PersistentVolumeClaimPatchMap{})
   255  	pulumi.RegisterOutputType(PersistentVolumeClaimPatchOutput{})
   256  	pulumi.RegisterOutputType(PersistentVolumeClaimPatchArrayOutput{})
   257  	pulumi.RegisterOutputType(PersistentVolumeClaimPatchMapOutput{})
   258  }