github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/storage/v1beta1/csidriverPatch.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  	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  // CSIDriver captures information about a Container Storage Interface (CSI) volume driver deployed on the cluster. CSI drivers do not need to create the CSIDriver object directly. Instead they may use the cluster-driver-registrar sidecar container. When deployed with a CSI driver it automatically creates a CSIDriver object representing the driver. Kubernetes attach detach controller uses this object to determine whether attach is required. Kubelet uses this object to determine whether pod information needs to be passed on mount. CSIDriver objects are non-namespaced.
    21  type CSIDriverPatch 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 metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    29  	Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"`
    30  	// Specification of the CSI Driver.
    31  	Spec CSIDriverSpecPatchPtrOutput `pulumi:"spec"`
    32  }
    33  
    34  // NewCSIDriverPatch registers a new resource with the given unique name, arguments, and options.
    35  func NewCSIDriverPatch(ctx *pulumi.Context,
    36  	name string, args *CSIDriverPatchArgs, opts ...pulumi.ResourceOption) (*CSIDriverPatch, error) {
    37  	if args == nil {
    38  		args = &CSIDriverPatchArgs{}
    39  	}
    40  
    41  	args.ApiVersion = pulumi.StringPtr("storage.k8s.io/v1beta1")
    42  	args.Kind = pulumi.StringPtr("CSIDriver")
    43  	aliases := pulumi.Aliases([]pulumi.Alias{
    44  		{
    45  			Type: pulumi.String("kubernetes:storage.k8s.io/v1:CSIDriverPatch"),
    46  		},
    47  	})
    48  	opts = append(opts, aliases)
    49  	var resource CSIDriverPatch
    50  	err := ctx.RegisterResource("kubernetes:storage.k8s.io/v1beta1:CSIDriverPatch", name, args, &resource, opts...)
    51  	if err != nil {
    52  		return nil, err
    53  	}
    54  	return &resource, nil
    55  }
    56  
    57  // GetCSIDriverPatch gets an existing CSIDriverPatch 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 GetCSIDriverPatch(ctx *pulumi.Context,
    60  	name string, id pulumi.IDInput, state *CSIDriverPatchState, opts ...pulumi.ResourceOption) (*CSIDriverPatch, error) {
    61  	var resource CSIDriverPatch
    62  	err := ctx.ReadResource("kubernetes:storage.k8s.io/v1beta1:CSIDriverPatch", 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 CSIDriverPatch resources.
    70  type csidriverPatchState struct {
    71  }
    72  
    73  type CSIDriverPatchState struct {
    74  }
    75  
    76  func (CSIDriverPatchState) ElementType() reflect.Type {
    77  	return reflect.TypeOf((*csidriverPatchState)(nil)).Elem()
    78  }
    79  
    80  type csidriverPatchArgs 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 metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    86  	Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"`
    87  	// Specification of the CSI Driver.
    88  	Spec *CSIDriverSpecPatch `pulumi:"spec"`
    89  }
    90  
    91  // The set of arguments for constructing a CSIDriverPatch resource.
    92  type CSIDriverPatchArgs 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 metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    98  	Metadata metav1.ObjectMetaPatchPtrInput
    99  	// Specification of the CSI Driver.
   100  	Spec CSIDriverSpecPatchPtrInput
   101  }
   102  
   103  func (CSIDriverPatchArgs) ElementType() reflect.Type {
   104  	return reflect.TypeOf((*csidriverPatchArgs)(nil)).Elem()
   105  }
   106  
   107  type CSIDriverPatchInput interface {
   108  	pulumi.Input
   109  
   110  	ToCSIDriverPatchOutput() CSIDriverPatchOutput
   111  	ToCSIDriverPatchOutputWithContext(ctx context.Context) CSIDriverPatchOutput
   112  }
   113  
   114  func (*CSIDriverPatch) ElementType() reflect.Type {
   115  	return reflect.TypeOf((**CSIDriverPatch)(nil)).Elem()
   116  }
   117  
   118  func (i *CSIDriverPatch) ToCSIDriverPatchOutput() CSIDriverPatchOutput {
   119  	return i.ToCSIDriverPatchOutputWithContext(context.Background())
   120  }
   121  
   122  func (i *CSIDriverPatch) ToCSIDriverPatchOutputWithContext(ctx context.Context) CSIDriverPatchOutput {
   123  	return pulumi.ToOutputWithContext(ctx, i).(CSIDriverPatchOutput)
   124  }
   125  
   126  // CSIDriverPatchArrayInput is an input type that accepts CSIDriverPatchArray and CSIDriverPatchArrayOutput values.
   127  // You can construct a concrete instance of `CSIDriverPatchArrayInput` via:
   128  //
   129  //	CSIDriverPatchArray{ CSIDriverPatchArgs{...} }
   130  type CSIDriverPatchArrayInput interface {
   131  	pulumi.Input
   132  
   133  	ToCSIDriverPatchArrayOutput() CSIDriverPatchArrayOutput
   134  	ToCSIDriverPatchArrayOutputWithContext(context.Context) CSIDriverPatchArrayOutput
   135  }
   136  
   137  type CSIDriverPatchArray []CSIDriverPatchInput
   138  
   139  func (CSIDriverPatchArray) ElementType() reflect.Type {
   140  	return reflect.TypeOf((*[]*CSIDriverPatch)(nil)).Elem()
   141  }
   142  
   143  func (i CSIDriverPatchArray) ToCSIDriverPatchArrayOutput() CSIDriverPatchArrayOutput {
   144  	return i.ToCSIDriverPatchArrayOutputWithContext(context.Background())
   145  }
   146  
   147  func (i CSIDriverPatchArray) ToCSIDriverPatchArrayOutputWithContext(ctx context.Context) CSIDriverPatchArrayOutput {
   148  	return pulumi.ToOutputWithContext(ctx, i).(CSIDriverPatchArrayOutput)
   149  }
   150  
   151  // CSIDriverPatchMapInput is an input type that accepts CSIDriverPatchMap and CSIDriverPatchMapOutput values.
   152  // You can construct a concrete instance of `CSIDriverPatchMapInput` via:
   153  //
   154  //	CSIDriverPatchMap{ "key": CSIDriverPatchArgs{...} }
   155  type CSIDriverPatchMapInput interface {
   156  	pulumi.Input
   157  
   158  	ToCSIDriverPatchMapOutput() CSIDriverPatchMapOutput
   159  	ToCSIDriverPatchMapOutputWithContext(context.Context) CSIDriverPatchMapOutput
   160  }
   161  
   162  type CSIDriverPatchMap map[string]CSIDriverPatchInput
   163  
   164  func (CSIDriverPatchMap) ElementType() reflect.Type {
   165  	return reflect.TypeOf((*map[string]*CSIDriverPatch)(nil)).Elem()
   166  }
   167  
   168  func (i CSIDriverPatchMap) ToCSIDriverPatchMapOutput() CSIDriverPatchMapOutput {
   169  	return i.ToCSIDriverPatchMapOutputWithContext(context.Background())
   170  }
   171  
   172  func (i CSIDriverPatchMap) ToCSIDriverPatchMapOutputWithContext(ctx context.Context) CSIDriverPatchMapOutput {
   173  	return pulumi.ToOutputWithContext(ctx, i).(CSIDriverPatchMapOutput)
   174  }
   175  
   176  type CSIDriverPatchOutput struct{ *pulumi.OutputState }
   177  
   178  func (CSIDriverPatchOutput) ElementType() reflect.Type {
   179  	return reflect.TypeOf((**CSIDriverPatch)(nil)).Elem()
   180  }
   181  
   182  func (o CSIDriverPatchOutput) ToCSIDriverPatchOutput() CSIDriverPatchOutput {
   183  	return o
   184  }
   185  
   186  func (o CSIDriverPatchOutput) ToCSIDriverPatchOutputWithContext(ctx context.Context) CSIDriverPatchOutput {
   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 CSIDriverPatchOutput) ApiVersion() pulumi.StringPtrOutput {
   192  	return o.ApplyT(func(v *CSIDriverPatch) 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 CSIDriverPatchOutput) Kind() pulumi.StringPtrOutput {
   197  	return o.ApplyT(func(v *CSIDriverPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   198  }
   199  
   200  // Standard object metadata. metadata.Name indicates the name of the CSI driver that this object refers to; it MUST be the same name returned by the CSI GetPluginName() call for that driver. The driver name must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), dots (.), and alphanumerics between. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
   201  func (o CSIDriverPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput {
   202  	return o.ApplyT(func(v *CSIDriverPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput)
   203  }
   204  
   205  // Specification of the CSI Driver.
   206  func (o CSIDriverPatchOutput) Spec() CSIDriverSpecPatchPtrOutput {
   207  	return o.ApplyT(func(v *CSIDriverPatch) CSIDriverSpecPatchPtrOutput { return v.Spec }).(CSIDriverSpecPatchPtrOutput)
   208  }
   209  
   210  type CSIDriverPatchArrayOutput struct{ *pulumi.OutputState }
   211  
   212  func (CSIDriverPatchArrayOutput) ElementType() reflect.Type {
   213  	return reflect.TypeOf((*[]*CSIDriverPatch)(nil)).Elem()
   214  }
   215  
   216  func (o CSIDriverPatchArrayOutput) ToCSIDriverPatchArrayOutput() CSIDriverPatchArrayOutput {
   217  	return o
   218  }
   219  
   220  func (o CSIDriverPatchArrayOutput) ToCSIDriverPatchArrayOutputWithContext(ctx context.Context) CSIDriverPatchArrayOutput {
   221  	return o
   222  }
   223  
   224  func (o CSIDriverPatchArrayOutput) Index(i pulumi.IntInput) CSIDriverPatchOutput {
   225  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CSIDriverPatch {
   226  		return vs[0].([]*CSIDriverPatch)[vs[1].(int)]
   227  	}).(CSIDriverPatchOutput)
   228  }
   229  
   230  type CSIDriverPatchMapOutput struct{ *pulumi.OutputState }
   231  
   232  func (CSIDriverPatchMapOutput) ElementType() reflect.Type {
   233  	return reflect.TypeOf((*map[string]*CSIDriverPatch)(nil)).Elem()
   234  }
   235  
   236  func (o CSIDriverPatchMapOutput) ToCSIDriverPatchMapOutput() CSIDriverPatchMapOutput {
   237  	return o
   238  }
   239  
   240  func (o CSIDriverPatchMapOutput) ToCSIDriverPatchMapOutputWithContext(ctx context.Context) CSIDriverPatchMapOutput {
   241  	return o
   242  }
   243  
   244  func (o CSIDriverPatchMapOutput) MapIndex(k pulumi.StringInput) CSIDriverPatchOutput {
   245  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CSIDriverPatch {
   246  		return vs[0].(map[string]*CSIDriverPatch)[vs[1].(string)]
   247  	}).(CSIDriverPatchOutput)
   248  }
   249  
   250  func init() {
   251  	pulumi.RegisterInputType(reflect.TypeOf((*CSIDriverPatchInput)(nil)).Elem(), &CSIDriverPatch{})
   252  	pulumi.RegisterInputType(reflect.TypeOf((*CSIDriverPatchArrayInput)(nil)).Elem(), CSIDriverPatchArray{})
   253  	pulumi.RegisterInputType(reflect.TypeOf((*CSIDriverPatchMapInput)(nil)).Elem(), CSIDriverPatchMap{})
   254  	pulumi.RegisterOutputType(CSIDriverPatchOutput{})
   255  	pulumi.RegisterOutputType(CSIDriverPatchArrayOutput{})
   256  	pulumi.RegisterOutputType(CSIDriverPatchMapOutput{})
   257  }