github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/storage/v1/csinodePatch.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  // CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.
    21  type CSINodePatch 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. metadata.name must be the Kubernetes node name.
    29  	Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"`
    30  	// spec is the specification of CSINode
    31  	Spec CSINodeSpecPatchPtrOutput `pulumi:"spec"`
    32  }
    33  
    34  // NewCSINodePatch registers a new resource with the given unique name, arguments, and options.
    35  func NewCSINodePatch(ctx *pulumi.Context,
    36  	name string, args *CSINodePatchArgs, opts ...pulumi.ResourceOption) (*CSINodePatch, error) {
    37  	if args == nil {
    38  		args = &CSINodePatchArgs{}
    39  	}
    40  
    41  	args.ApiVersion = pulumi.StringPtr("storage.k8s.io/v1")
    42  	args.Kind = pulumi.StringPtr("CSINode")
    43  	aliases := pulumi.Aliases([]pulumi.Alias{
    44  		{
    45  			Type: pulumi.String("kubernetes:storage.k8s.io/v1beta1:CSINodePatch"),
    46  		},
    47  	})
    48  	opts = append(opts, aliases)
    49  	var resource CSINodePatch
    50  	err := ctx.RegisterResource("kubernetes:storage.k8s.io/v1:CSINodePatch", name, args, &resource, opts...)
    51  	if err != nil {
    52  		return nil, err
    53  	}
    54  	return &resource, nil
    55  }
    56  
    57  // GetCSINodePatch gets an existing CSINodePatch resource's state with the given name, ID, and optional
    58  // state properties that are used to uniquely qualify the lookup (nil if not required).
    59  func GetCSINodePatch(ctx *pulumi.Context,
    60  	name string, id pulumi.IDInput, state *CSINodePatchState, opts ...pulumi.ResourceOption) (*CSINodePatch, error) {
    61  	var resource CSINodePatch
    62  	err := ctx.ReadResource("kubernetes:storage.k8s.io/v1:CSINodePatch", name, id, state, &resource, opts...)
    63  	if err != nil {
    64  		return nil, err
    65  	}
    66  	return &resource, nil
    67  }
    68  
    69  // Input properties used for looking up and filtering CSINodePatch resources.
    70  type csinodePatchState struct {
    71  }
    72  
    73  type CSINodePatchState struct {
    74  }
    75  
    76  func (CSINodePatchState) ElementType() reflect.Type {
    77  	return reflect.TypeOf((*csinodePatchState)(nil)).Elem()
    78  }
    79  
    80  type csinodePatchArgs struct {
    81  	// 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
    82  	ApiVersion *string `pulumi:"apiVersion"`
    83  	// 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
    84  	Kind *string `pulumi:"kind"`
    85  	// Standard object's metadata. metadata.name must be the Kubernetes node name.
    86  	Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"`
    87  	// spec is the specification of CSINode
    88  	Spec *CSINodeSpecPatch `pulumi:"spec"`
    89  }
    90  
    91  // The set of arguments for constructing a CSINodePatch resource.
    92  type CSINodePatchArgs struct {
    93  	// 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
    94  	ApiVersion pulumi.StringPtrInput
    95  	// 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
    96  	Kind pulumi.StringPtrInput
    97  	// Standard object's metadata. metadata.name must be the Kubernetes node name.
    98  	Metadata metav1.ObjectMetaPatchPtrInput
    99  	// spec is the specification of CSINode
   100  	Spec CSINodeSpecPatchPtrInput
   101  }
   102  
   103  func (CSINodePatchArgs) ElementType() reflect.Type {
   104  	return reflect.TypeOf((*csinodePatchArgs)(nil)).Elem()
   105  }
   106  
   107  type CSINodePatchInput interface {
   108  	pulumi.Input
   109  
   110  	ToCSINodePatchOutput() CSINodePatchOutput
   111  	ToCSINodePatchOutputWithContext(ctx context.Context) CSINodePatchOutput
   112  }
   113  
   114  func (*CSINodePatch) ElementType() reflect.Type {
   115  	return reflect.TypeOf((**CSINodePatch)(nil)).Elem()
   116  }
   117  
   118  func (i *CSINodePatch) ToCSINodePatchOutput() CSINodePatchOutput {
   119  	return i.ToCSINodePatchOutputWithContext(context.Background())
   120  }
   121  
   122  func (i *CSINodePatch) ToCSINodePatchOutputWithContext(ctx context.Context) CSINodePatchOutput {
   123  	return pulumi.ToOutputWithContext(ctx, i).(CSINodePatchOutput)
   124  }
   125  
   126  // CSINodePatchArrayInput is an input type that accepts CSINodePatchArray and CSINodePatchArrayOutput values.
   127  // You can construct a concrete instance of `CSINodePatchArrayInput` via:
   128  //
   129  //	CSINodePatchArray{ CSINodePatchArgs{...} }
   130  type CSINodePatchArrayInput interface {
   131  	pulumi.Input
   132  
   133  	ToCSINodePatchArrayOutput() CSINodePatchArrayOutput
   134  	ToCSINodePatchArrayOutputWithContext(context.Context) CSINodePatchArrayOutput
   135  }
   136  
   137  type CSINodePatchArray []CSINodePatchInput
   138  
   139  func (CSINodePatchArray) ElementType() reflect.Type {
   140  	return reflect.TypeOf((*[]*CSINodePatch)(nil)).Elem()
   141  }
   142  
   143  func (i CSINodePatchArray) ToCSINodePatchArrayOutput() CSINodePatchArrayOutput {
   144  	return i.ToCSINodePatchArrayOutputWithContext(context.Background())
   145  }
   146  
   147  func (i CSINodePatchArray) ToCSINodePatchArrayOutputWithContext(ctx context.Context) CSINodePatchArrayOutput {
   148  	return pulumi.ToOutputWithContext(ctx, i).(CSINodePatchArrayOutput)
   149  }
   150  
   151  // CSINodePatchMapInput is an input type that accepts CSINodePatchMap and CSINodePatchMapOutput values.
   152  // You can construct a concrete instance of `CSINodePatchMapInput` via:
   153  //
   154  //	CSINodePatchMap{ "key": CSINodePatchArgs{...} }
   155  type CSINodePatchMapInput interface {
   156  	pulumi.Input
   157  
   158  	ToCSINodePatchMapOutput() CSINodePatchMapOutput
   159  	ToCSINodePatchMapOutputWithContext(context.Context) CSINodePatchMapOutput
   160  }
   161  
   162  type CSINodePatchMap map[string]CSINodePatchInput
   163  
   164  func (CSINodePatchMap) ElementType() reflect.Type {
   165  	return reflect.TypeOf((*map[string]*CSINodePatch)(nil)).Elem()
   166  }
   167  
   168  func (i CSINodePatchMap) ToCSINodePatchMapOutput() CSINodePatchMapOutput {
   169  	return i.ToCSINodePatchMapOutputWithContext(context.Background())
   170  }
   171  
   172  func (i CSINodePatchMap) ToCSINodePatchMapOutputWithContext(ctx context.Context) CSINodePatchMapOutput {
   173  	return pulumi.ToOutputWithContext(ctx, i).(CSINodePatchMapOutput)
   174  }
   175  
   176  type CSINodePatchOutput struct{ *pulumi.OutputState }
   177  
   178  func (CSINodePatchOutput) ElementType() reflect.Type {
   179  	return reflect.TypeOf((**CSINodePatch)(nil)).Elem()
   180  }
   181  
   182  func (o CSINodePatchOutput) ToCSINodePatchOutput() CSINodePatchOutput {
   183  	return o
   184  }
   185  
   186  func (o CSINodePatchOutput) ToCSINodePatchOutputWithContext(ctx context.Context) CSINodePatchOutput {
   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 CSINodePatchOutput) ApiVersion() pulumi.StringPtrOutput {
   192  	return o.ApplyT(func(v *CSINodePatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
   193  }
   194  
   195  // 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
   196  func (o CSINodePatchOutput) Kind() pulumi.StringPtrOutput {
   197  	return o.ApplyT(func(v *CSINodePatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   198  }
   199  
   200  // Standard object's metadata. metadata.name must be the Kubernetes node name.
   201  func (o CSINodePatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput {
   202  	return o.ApplyT(func(v *CSINodePatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput)
   203  }
   204  
   205  // spec is the specification of CSINode
   206  func (o CSINodePatchOutput) Spec() CSINodeSpecPatchPtrOutput {
   207  	return o.ApplyT(func(v *CSINodePatch) CSINodeSpecPatchPtrOutput { return v.Spec }).(CSINodeSpecPatchPtrOutput)
   208  }
   209  
   210  type CSINodePatchArrayOutput struct{ *pulumi.OutputState }
   211  
   212  func (CSINodePatchArrayOutput) ElementType() reflect.Type {
   213  	return reflect.TypeOf((*[]*CSINodePatch)(nil)).Elem()
   214  }
   215  
   216  func (o CSINodePatchArrayOutput) ToCSINodePatchArrayOutput() CSINodePatchArrayOutput {
   217  	return o
   218  }
   219  
   220  func (o CSINodePatchArrayOutput) ToCSINodePatchArrayOutputWithContext(ctx context.Context) CSINodePatchArrayOutput {
   221  	return o
   222  }
   223  
   224  func (o CSINodePatchArrayOutput) Index(i pulumi.IntInput) CSINodePatchOutput {
   225  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CSINodePatch {
   226  		return vs[0].([]*CSINodePatch)[vs[1].(int)]
   227  	}).(CSINodePatchOutput)
   228  }
   229  
   230  type CSINodePatchMapOutput struct{ *pulumi.OutputState }
   231  
   232  func (CSINodePatchMapOutput) ElementType() reflect.Type {
   233  	return reflect.TypeOf((*map[string]*CSINodePatch)(nil)).Elem()
   234  }
   235  
   236  func (o CSINodePatchMapOutput) ToCSINodePatchMapOutput() CSINodePatchMapOutput {
   237  	return o
   238  }
   239  
   240  func (o CSINodePatchMapOutput) ToCSINodePatchMapOutputWithContext(ctx context.Context) CSINodePatchMapOutput {
   241  	return o
   242  }
   243  
   244  func (o CSINodePatchMapOutput) MapIndex(k pulumi.StringInput) CSINodePatchOutput {
   245  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CSINodePatch {
   246  		return vs[0].(map[string]*CSINodePatch)[vs[1].(string)]
   247  	}).(CSINodePatchOutput)
   248  }
   249  
   250  func init() {
   251  	pulumi.RegisterInputType(reflect.TypeOf((*CSINodePatchInput)(nil)).Elem(), &CSINodePatch{})
   252  	pulumi.RegisterInputType(reflect.TypeOf((*CSINodePatchArrayInput)(nil)).Elem(), CSINodePatchArray{})
   253  	pulumi.RegisterInputType(reflect.TypeOf((*CSINodePatchMapInput)(nil)).Elem(), CSINodePatchMap{})
   254  	pulumi.RegisterOutputType(CSINodePatchOutput{})
   255  	pulumi.RegisterOutputType(CSINodePatchArrayOutput{})
   256  	pulumi.RegisterOutputType(CSINodePatchMapOutput{})
   257  }