github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/storage/v1beta1/volumeAttachmentPatch.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  // VolumeAttachment captures the intent to attach or detach the specified volume to/from the specified node.
    21  //
    22  // VolumeAttachment objects are non-namespaced.
    23  type VolumeAttachmentPatch struct {
    24  	pulumi.CustomResourceState
    25  
    26  	// 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
    27  	ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"`
    28  	// 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
    29  	Kind pulumi.StringPtrOutput `pulumi:"kind"`
    30  	// Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    31  	Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"`
    32  	// Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.
    33  	Spec VolumeAttachmentSpecPatchPtrOutput `pulumi:"spec"`
    34  	// Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.
    35  	Status VolumeAttachmentStatusPatchPtrOutput `pulumi:"status"`
    36  }
    37  
    38  // NewVolumeAttachmentPatch registers a new resource with the given unique name, arguments, and options.
    39  func NewVolumeAttachmentPatch(ctx *pulumi.Context,
    40  	name string, args *VolumeAttachmentPatchArgs, opts ...pulumi.ResourceOption) (*VolumeAttachmentPatch, error) {
    41  	if args == nil {
    42  		args = &VolumeAttachmentPatchArgs{}
    43  	}
    44  
    45  	args.ApiVersion = pulumi.StringPtr("storage.k8s.io/v1beta1")
    46  	args.Kind = pulumi.StringPtr("VolumeAttachment")
    47  	aliases := pulumi.Aliases([]pulumi.Alias{
    48  		{
    49  			Type: pulumi.String("kubernetes:storage.k8s.io/v1:VolumeAttachmentPatch"),
    50  		},
    51  		{
    52  			Type: pulumi.String("kubernetes:storage.k8s.io/v1alpha1:VolumeAttachmentPatch"),
    53  		},
    54  	})
    55  	opts = append(opts, aliases)
    56  	var resource VolumeAttachmentPatch
    57  	err := ctx.RegisterResource("kubernetes:storage.k8s.io/v1beta1:VolumeAttachmentPatch", name, args, &resource, opts...)
    58  	if err != nil {
    59  		return nil, err
    60  	}
    61  	return &resource, nil
    62  }
    63  
    64  // GetVolumeAttachmentPatch gets an existing VolumeAttachmentPatch resource's state with the given name, ID, and optional
    65  // state properties that are used to uniquely qualify the lookup (nil if not required).
    66  func GetVolumeAttachmentPatch(ctx *pulumi.Context,
    67  	name string, id pulumi.IDInput, state *VolumeAttachmentPatchState, opts ...pulumi.ResourceOption) (*VolumeAttachmentPatch, error) {
    68  	var resource VolumeAttachmentPatch
    69  	err := ctx.ReadResource("kubernetes:storage.k8s.io/v1beta1:VolumeAttachmentPatch", name, id, state, &resource, opts...)
    70  	if err != nil {
    71  		return nil, err
    72  	}
    73  	return &resource, nil
    74  }
    75  
    76  // Input properties used for looking up and filtering VolumeAttachmentPatch resources.
    77  type volumeAttachmentPatchState struct {
    78  }
    79  
    80  type VolumeAttachmentPatchState struct {
    81  }
    82  
    83  func (VolumeAttachmentPatchState) ElementType() reflect.Type {
    84  	return reflect.TypeOf((*volumeAttachmentPatchState)(nil)).Elem()
    85  }
    86  
    87  type volumeAttachmentPatchArgs struct {
    88  	// 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
    89  	ApiVersion *string `pulumi:"apiVersion"`
    90  	// 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
    91  	Kind *string `pulumi:"kind"`
    92  	// Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    93  	Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"`
    94  	// Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.
    95  	Spec *VolumeAttachmentSpecPatch `pulumi:"spec"`
    96  }
    97  
    98  // The set of arguments for constructing a VolumeAttachmentPatch resource.
    99  type VolumeAttachmentPatchArgs struct {
   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 pulumi.StringPtrInput
   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 pulumi.StringPtrInput
   104  	// Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
   105  	Metadata metav1.ObjectMetaPatchPtrInput
   106  	// Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.
   107  	Spec VolumeAttachmentSpecPatchPtrInput
   108  }
   109  
   110  func (VolumeAttachmentPatchArgs) ElementType() reflect.Type {
   111  	return reflect.TypeOf((*volumeAttachmentPatchArgs)(nil)).Elem()
   112  }
   113  
   114  type VolumeAttachmentPatchInput interface {
   115  	pulumi.Input
   116  
   117  	ToVolumeAttachmentPatchOutput() VolumeAttachmentPatchOutput
   118  	ToVolumeAttachmentPatchOutputWithContext(ctx context.Context) VolumeAttachmentPatchOutput
   119  }
   120  
   121  func (*VolumeAttachmentPatch) ElementType() reflect.Type {
   122  	return reflect.TypeOf((**VolumeAttachmentPatch)(nil)).Elem()
   123  }
   124  
   125  func (i *VolumeAttachmentPatch) ToVolumeAttachmentPatchOutput() VolumeAttachmentPatchOutput {
   126  	return i.ToVolumeAttachmentPatchOutputWithContext(context.Background())
   127  }
   128  
   129  func (i *VolumeAttachmentPatch) ToVolumeAttachmentPatchOutputWithContext(ctx context.Context) VolumeAttachmentPatchOutput {
   130  	return pulumi.ToOutputWithContext(ctx, i).(VolumeAttachmentPatchOutput)
   131  }
   132  
   133  // VolumeAttachmentPatchArrayInput is an input type that accepts VolumeAttachmentPatchArray and VolumeAttachmentPatchArrayOutput values.
   134  // You can construct a concrete instance of `VolumeAttachmentPatchArrayInput` via:
   135  //
   136  //	VolumeAttachmentPatchArray{ VolumeAttachmentPatchArgs{...} }
   137  type VolumeAttachmentPatchArrayInput interface {
   138  	pulumi.Input
   139  
   140  	ToVolumeAttachmentPatchArrayOutput() VolumeAttachmentPatchArrayOutput
   141  	ToVolumeAttachmentPatchArrayOutputWithContext(context.Context) VolumeAttachmentPatchArrayOutput
   142  }
   143  
   144  type VolumeAttachmentPatchArray []VolumeAttachmentPatchInput
   145  
   146  func (VolumeAttachmentPatchArray) ElementType() reflect.Type {
   147  	return reflect.TypeOf((*[]*VolumeAttachmentPatch)(nil)).Elem()
   148  }
   149  
   150  func (i VolumeAttachmentPatchArray) ToVolumeAttachmentPatchArrayOutput() VolumeAttachmentPatchArrayOutput {
   151  	return i.ToVolumeAttachmentPatchArrayOutputWithContext(context.Background())
   152  }
   153  
   154  func (i VolumeAttachmentPatchArray) ToVolumeAttachmentPatchArrayOutputWithContext(ctx context.Context) VolumeAttachmentPatchArrayOutput {
   155  	return pulumi.ToOutputWithContext(ctx, i).(VolumeAttachmentPatchArrayOutput)
   156  }
   157  
   158  // VolumeAttachmentPatchMapInput is an input type that accepts VolumeAttachmentPatchMap and VolumeAttachmentPatchMapOutput values.
   159  // You can construct a concrete instance of `VolumeAttachmentPatchMapInput` via:
   160  //
   161  //	VolumeAttachmentPatchMap{ "key": VolumeAttachmentPatchArgs{...} }
   162  type VolumeAttachmentPatchMapInput interface {
   163  	pulumi.Input
   164  
   165  	ToVolumeAttachmentPatchMapOutput() VolumeAttachmentPatchMapOutput
   166  	ToVolumeAttachmentPatchMapOutputWithContext(context.Context) VolumeAttachmentPatchMapOutput
   167  }
   168  
   169  type VolumeAttachmentPatchMap map[string]VolumeAttachmentPatchInput
   170  
   171  func (VolumeAttachmentPatchMap) ElementType() reflect.Type {
   172  	return reflect.TypeOf((*map[string]*VolumeAttachmentPatch)(nil)).Elem()
   173  }
   174  
   175  func (i VolumeAttachmentPatchMap) ToVolumeAttachmentPatchMapOutput() VolumeAttachmentPatchMapOutput {
   176  	return i.ToVolumeAttachmentPatchMapOutputWithContext(context.Background())
   177  }
   178  
   179  func (i VolumeAttachmentPatchMap) ToVolumeAttachmentPatchMapOutputWithContext(ctx context.Context) VolumeAttachmentPatchMapOutput {
   180  	return pulumi.ToOutputWithContext(ctx, i).(VolumeAttachmentPatchMapOutput)
   181  }
   182  
   183  type VolumeAttachmentPatchOutput struct{ *pulumi.OutputState }
   184  
   185  func (VolumeAttachmentPatchOutput) ElementType() reflect.Type {
   186  	return reflect.TypeOf((**VolumeAttachmentPatch)(nil)).Elem()
   187  }
   188  
   189  func (o VolumeAttachmentPatchOutput) ToVolumeAttachmentPatchOutput() VolumeAttachmentPatchOutput {
   190  	return o
   191  }
   192  
   193  func (o VolumeAttachmentPatchOutput) ToVolumeAttachmentPatchOutputWithContext(ctx context.Context) VolumeAttachmentPatchOutput {
   194  	return o
   195  }
   196  
   197  // 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
   198  func (o VolumeAttachmentPatchOutput) ApiVersion() pulumi.StringPtrOutput {
   199  	return o.ApplyT(func(v *VolumeAttachmentPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
   200  }
   201  
   202  // 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
   203  func (o VolumeAttachmentPatchOutput) Kind() pulumi.StringPtrOutput {
   204  	return o.ApplyT(func(v *VolumeAttachmentPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   205  }
   206  
   207  // Standard object metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
   208  func (o VolumeAttachmentPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput {
   209  	return o.ApplyT(func(v *VolumeAttachmentPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput)
   210  }
   211  
   212  // Specification of the desired attach/detach volume behavior. Populated by the Kubernetes system.
   213  func (o VolumeAttachmentPatchOutput) Spec() VolumeAttachmentSpecPatchPtrOutput {
   214  	return o.ApplyT(func(v *VolumeAttachmentPatch) VolumeAttachmentSpecPatchPtrOutput { return v.Spec }).(VolumeAttachmentSpecPatchPtrOutput)
   215  }
   216  
   217  // Status of the VolumeAttachment request. Populated by the entity completing the attach or detach operation, i.e. the external-attacher.
   218  func (o VolumeAttachmentPatchOutput) Status() VolumeAttachmentStatusPatchPtrOutput {
   219  	return o.ApplyT(func(v *VolumeAttachmentPatch) VolumeAttachmentStatusPatchPtrOutput { return v.Status }).(VolumeAttachmentStatusPatchPtrOutput)
   220  }
   221  
   222  type VolumeAttachmentPatchArrayOutput struct{ *pulumi.OutputState }
   223  
   224  func (VolumeAttachmentPatchArrayOutput) ElementType() reflect.Type {
   225  	return reflect.TypeOf((*[]*VolumeAttachmentPatch)(nil)).Elem()
   226  }
   227  
   228  func (o VolumeAttachmentPatchArrayOutput) ToVolumeAttachmentPatchArrayOutput() VolumeAttachmentPatchArrayOutput {
   229  	return o
   230  }
   231  
   232  func (o VolumeAttachmentPatchArrayOutput) ToVolumeAttachmentPatchArrayOutputWithContext(ctx context.Context) VolumeAttachmentPatchArrayOutput {
   233  	return o
   234  }
   235  
   236  func (o VolumeAttachmentPatchArrayOutput) Index(i pulumi.IntInput) VolumeAttachmentPatchOutput {
   237  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VolumeAttachmentPatch {
   238  		return vs[0].([]*VolumeAttachmentPatch)[vs[1].(int)]
   239  	}).(VolumeAttachmentPatchOutput)
   240  }
   241  
   242  type VolumeAttachmentPatchMapOutput struct{ *pulumi.OutputState }
   243  
   244  func (VolumeAttachmentPatchMapOutput) ElementType() reflect.Type {
   245  	return reflect.TypeOf((*map[string]*VolumeAttachmentPatch)(nil)).Elem()
   246  }
   247  
   248  func (o VolumeAttachmentPatchMapOutput) ToVolumeAttachmentPatchMapOutput() VolumeAttachmentPatchMapOutput {
   249  	return o
   250  }
   251  
   252  func (o VolumeAttachmentPatchMapOutput) ToVolumeAttachmentPatchMapOutputWithContext(ctx context.Context) VolumeAttachmentPatchMapOutput {
   253  	return o
   254  }
   255  
   256  func (o VolumeAttachmentPatchMapOutput) MapIndex(k pulumi.StringInput) VolumeAttachmentPatchOutput {
   257  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VolumeAttachmentPatch {
   258  		return vs[0].(map[string]*VolumeAttachmentPatch)[vs[1].(string)]
   259  	}).(VolumeAttachmentPatchOutput)
   260  }
   261  
   262  func init() {
   263  	pulumi.RegisterInputType(reflect.TypeOf((*VolumeAttachmentPatchInput)(nil)).Elem(), &VolumeAttachmentPatch{})
   264  	pulumi.RegisterInputType(reflect.TypeOf((*VolumeAttachmentPatchArrayInput)(nil)).Elem(), VolumeAttachmentPatchArray{})
   265  	pulumi.RegisterInputType(reflect.TypeOf((*VolumeAttachmentPatchMapInput)(nil)).Elem(), VolumeAttachmentPatchMap{})
   266  	pulumi.RegisterOutputType(VolumeAttachmentPatchOutput{})
   267  	pulumi.RegisterOutputType(VolumeAttachmentPatchArrayOutput{})
   268  	pulumi.RegisterOutputType(VolumeAttachmentPatchMapOutput{})
   269  }