github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/resource/v1alpha2/resourceClaimTemplatePatch.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 v1alpha2
     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  // ResourceClaimTemplate is used to produce ResourceClaim objects.
    21  type ResourceClaimTemplatePatch 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
    29  	Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"`
    30  	// Describes the ResourceClaim that is to be generated.
    31  	//
    32  	// This field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.
    33  	Spec ResourceClaimTemplateSpecPatchPtrOutput `pulumi:"spec"`
    34  }
    35  
    36  // NewResourceClaimTemplatePatch registers a new resource with the given unique name, arguments, and options.
    37  func NewResourceClaimTemplatePatch(ctx *pulumi.Context,
    38  	name string, args *ResourceClaimTemplatePatchArgs, opts ...pulumi.ResourceOption) (*ResourceClaimTemplatePatch, error) {
    39  	if args == nil {
    40  		args = &ResourceClaimTemplatePatchArgs{}
    41  	}
    42  
    43  	args.ApiVersion = pulumi.StringPtr("resource.k8s.io/v1alpha2")
    44  	args.Kind = pulumi.StringPtr("ResourceClaimTemplate")
    45  	aliases := pulumi.Aliases([]pulumi.Alias{
    46  		{
    47  			Type: pulumi.String("kubernetes:resource.k8s.io/v1alpha1:ResourceClaimTemplatePatch"),
    48  		},
    49  	})
    50  	opts = append(opts, aliases)
    51  	var resource ResourceClaimTemplatePatch
    52  	err := ctx.RegisterResource("kubernetes:resource.k8s.io/v1alpha2:ResourceClaimTemplatePatch", name, args, &resource, opts...)
    53  	if err != nil {
    54  		return nil, err
    55  	}
    56  	return &resource, nil
    57  }
    58  
    59  // GetResourceClaimTemplatePatch gets an existing ResourceClaimTemplatePatch resource's state with the given name, ID, and optional
    60  // state properties that are used to uniquely qualify the lookup (nil if not required).
    61  func GetResourceClaimTemplatePatch(ctx *pulumi.Context,
    62  	name string, id pulumi.IDInput, state *ResourceClaimTemplatePatchState, opts ...pulumi.ResourceOption) (*ResourceClaimTemplatePatch, error) {
    63  	var resource ResourceClaimTemplatePatch
    64  	err := ctx.ReadResource("kubernetes:resource.k8s.io/v1alpha2:ResourceClaimTemplatePatch", name, id, state, &resource, opts...)
    65  	if err != nil {
    66  		return nil, err
    67  	}
    68  	return &resource, nil
    69  }
    70  
    71  // Input properties used for looking up and filtering ResourceClaimTemplatePatch resources.
    72  type resourceClaimTemplatePatchState struct {
    73  }
    74  
    75  type ResourceClaimTemplatePatchState struct {
    76  }
    77  
    78  func (ResourceClaimTemplatePatchState) ElementType() reflect.Type {
    79  	return reflect.TypeOf((*resourceClaimTemplatePatchState)(nil)).Elem()
    80  }
    81  
    82  type resourceClaimTemplatePatchArgs struct {
    83  	// 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
    84  	ApiVersion *string `pulumi:"apiVersion"`
    85  	// 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
    86  	Kind *string `pulumi:"kind"`
    87  	// Standard object metadata
    88  	Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"`
    89  	// Describes the ResourceClaim that is to be generated.
    90  	//
    91  	// This field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.
    92  	Spec *ResourceClaimTemplateSpecPatch `pulumi:"spec"`
    93  }
    94  
    95  // The set of arguments for constructing a ResourceClaimTemplatePatch resource.
    96  type ResourceClaimTemplatePatchArgs struct {
    97  	// 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
    98  	ApiVersion pulumi.StringPtrInput
    99  	// 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
   100  	Kind pulumi.StringPtrInput
   101  	// Standard object metadata
   102  	Metadata metav1.ObjectMetaPatchPtrInput
   103  	// Describes the ResourceClaim that is to be generated.
   104  	//
   105  	// This field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.
   106  	Spec ResourceClaimTemplateSpecPatchPtrInput
   107  }
   108  
   109  func (ResourceClaimTemplatePatchArgs) ElementType() reflect.Type {
   110  	return reflect.TypeOf((*resourceClaimTemplatePatchArgs)(nil)).Elem()
   111  }
   112  
   113  type ResourceClaimTemplatePatchInput interface {
   114  	pulumi.Input
   115  
   116  	ToResourceClaimTemplatePatchOutput() ResourceClaimTemplatePatchOutput
   117  	ToResourceClaimTemplatePatchOutputWithContext(ctx context.Context) ResourceClaimTemplatePatchOutput
   118  }
   119  
   120  func (*ResourceClaimTemplatePatch) ElementType() reflect.Type {
   121  	return reflect.TypeOf((**ResourceClaimTemplatePatch)(nil)).Elem()
   122  }
   123  
   124  func (i *ResourceClaimTemplatePatch) ToResourceClaimTemplatePatchOutput() ResourceClaimTemplatePatchOutput {
   125  	return i.ToResourceClaimTemplatePatchOutputWithContext(context.Background())
   126  }
   127  
   128  func (i *ResourceClaimTemplatePatch) ToResourceClaimTemplatePatchOutputWithContext(ctx context.Context) ResourceClaimTemplatePatchOutput {
   129  	return pulumi.ToOutputWithContext(ctx, i).(ResourceClaimTemplatePatchOutput)
   130  }
   131  
   132  // ResourceClaimTemplatePatchArrayInput is an input type that accepts ResourceClaimTemplatePatchArray and ResourceClaimTemplatePatchArrayOutput values.
   133  // You can construct a concrete instance of `ResourceClaimTemplatePatchArrayInput` via:
   134  //
   135  //	ResourceClaimTemplatePatchArray{ ResourceClaimTemplatePatchArgs{...} }
   136  type ResourceClaimTemplatePatchArrayInput interface {
   137  	pulumi.Input
   138  
   139  	ToResourceClaimTemplatePatchArrayOutput() ResourceClaimTemplatePatchArrayOutput
   140  	ToResourceClaimTemplatePatchArrayOutputWithContext(context.Context) ResourceClaimTemplatePatchArrayOutput
   141  }
   142  
   143  type ResourceClaimTemplatePatchArray []ResourceClaimTemplatePatchInput
   144  
   145  func (ResourceClaimTemplatePatchArray) ElementType() reflect.Type {
   146  	return reflect.TypeOf((*[]*ResourceClaimTemplatePatch)(nil)).Elem()
   147  }
   148  
   149  func (i ResourceClaimTemplatePatchArray) ToResourceClaimTemplatePatchArrayOutput() ResourceClaimTemplatePatchArrayOutput {
   150  	return i.ToResourceClaimTemplatePatchArrayOutputWithContext(context.Background())
   151  }
   152  
   153  func (i ResourceClaimTemplatePatchArray) ToResourceClaimTemplatePatchArrayOutputWithContext(ctx context.Context) ResourceClaimTemplatePatchArrayOutput {
   154  	return pulumi.ToOutputWithContext(ctx, i).(ResourceClaimTemplatePatchArrayOutput)
   155  }
   156  
   157  // ResourceClaimTemplatePatchMapInput is an input type that accepts ResourceClaimTemplatePatchMap and ResourceClaimTemplatePatchMapOutput values.
   158  // You can construct a concrete instance of `ResourceClaimTemplatePatchMapInput` via:
   159  //
   160  //	ResourceClaimTemplatePatchMap{ "key": ResourceClaimTemplatePatchArgs{...} }
   161  type ResourceClaimTemplatePatchMapInput interface {
   162  	pulumi.Input
   163  
   164  	ToResourceClaimTemplatePatchMapOutput() ResourceClaimTemplatePatchMapOutput
   165  	ToResourceClaimTemplatePatchMapOutputWithContext(context.Context) ResourceClaimTemplatePatchMapOutput
   166  }
   167  
   168  type ResourceClaimTemplatePatchMap map[string]ResourceClaimTemplatePatchInput
   169  
   170  func (ResourceClaimTemplatePatchMap) ElementType() reflect.Type {
   171  	return reflect.TypeOf((*map[string]*ResourceClaimTemplatePatch)(nil)).Elem()
   172  }
   173  
   174  func (i ResourceClaimTemplatePatchMap) ToResourceClaimTemplatePatchMapOutput() ResourceClaimTemplatePatchMapOutput {
   175  	return i.ToResourceClaimTemplatePatchMapOutputWithContext(context.Background())
   176  }
   177  
   178  func (i ResourceClaimTemplatePatchMap) ToResourceClaimTemplatePatchMapOutputWithContext(ctx context.Context) ResourceClaimTemplatePatchMapOutput {
   179  	return pulumi.ToOutputWithContext(ctx, i).(ResourceClaimTemplatePatchMapOutput)
   180  }
   181  
   182  type ResourceClaimTemplatePatchOutput struct{ *pulumi.OutputState }
   183  
   184  func (ResourceClaimTemplatePatchOutput) ElementType() reflect.Type {
   185  	return reflect.TypeOf((**ResourceClaimTemplatePatch)(nil)).Elem()
   186  }
   187  
   188  func (o ResourceClaimTemplatePatchOutput) ToResourceClaimTemplatePatchOutput() ResourceClaimTemplatePatchOutput {
   189  	return o
   190  }
   191  
   192  func (o ResourceClaimTemplatePatchOutput) ToResourceClaimTemplatePatchOutputWithContext(ctx context.Context) ResourceClaimTemplatePatchOutput {
   193  	return o
   194  }
   195  
   196  // 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
   197  func (o ResourceClaimTemplatePatchOutput) ApiVersion() pulumi.StringPtrOutput {
   198  	return o.ApplyT(func(v *ResourceClaimTemplatePatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
   199  }
   200  
   201  // 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
   202  func (o ResourceClaimTemplatePatchOutput) Kind() pulumi.StringPtrOutput {
   203  	return o.ApplyT(func(v *ResourceClaimTemplatePatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   204  }
   205  
   206  // Standard object metadata
   207  func (o ResourceClaimTemplatePatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput {
   208  	return o.ApplyT(func(v *ResourceClaimTemplatePatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput)
   209  }
   210  
   211  // Describes the ResourceClaim that is to be generated.
   212  //
   213  // This field is immutable. A ResourceClaim will get created by the control plane for a Pod when needed and then not get updated anymore.
   214  func (o ResourceClaimTemplatePatchOutput) Spec() ResourceClaimTemplateSpecPatchPtrOutput {
   215  	return o.ApplyT(func(v *ResourceClaimTemplatePatch) ResourceClaimTemplateSpecPatchPtrOutput { return v.Spec }).(ResourceClaimTemplateSpecPatchPtrOutput)
   216  }
   217  
   218  type ResourceClaimTemplatePatchArrayOutput struct{ *pulumi.OutputState }
   219  
   220  func (ResourceClaimTemplatePatchArrayOutput) ElementType() reflect.Type {
   221  	return reflect.TypeOf((*[]*ResourceClaimTemplatePatch)(nil)).Elem()
   222  }
   223  
   224  func (o ResourceClaimTemplatePatchArrayOutput) ToResourceClaimTemplatePatchArrayOutput() ResourceClaimTemplatePatchArrayOutput {
   225  	return o
   226  }
   227  
   228  func (o ResourceClaimTemplatePatchArrayOutput) ToResourceClaimTemplatePatchArrayOutputWithContext(ctx context.Context) ResourceClaimTemplatePatchArrayOutput {
   229  	return o
   230  }
   231  
   232  func (o ResourceClaimTemplatePatchArrayOutput) Index(i pulumi.IntInput) ResourceClaimTemplatePatchOutput {
   233  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourceClaimTemplatePatch {
   234  		return vs[0].([]*ResourceClaimTemplatePatch)[vs[1].(int)]
   235  	}).(ResourceClaimTemplatePatchOutput)
   236  }
   237  
   238  type ResourceClaimTemplatePatchMapOutput struct{ *pulumi.OutputState }
   239  
   240  func (ResourceClaimTemplatePatchMapOutput) ElementType() reflect.Type {
   241  	return reflect.TypeOf((*map[string]*ResourceClaimTemplatePatch)(nil)).Elem()
   242  }
   243  
   244  func (o ResourceClaimTemplatePatchMapOutput) ToResourceClaimTemplatePatchMapOutput() ResourceClaimTemplatePatchMapOutput {
   245  	return o
   246  }
   247  
   248  func (o ResourceClaimTemplatePatchMapOutput) ToResourceClaimTemplatePatchMapOutputWithContext(ctx context.Context) ResourceClaimTemplatePatchMapOutput {
   249  	return o
   250  }
   251  
   252  func (o ResourceClaimTemplatePatchMapOutput) MapIndex(k pulumi.StringInput) ResourceClaimTemplatePatchOutput {
   253  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourceClaimTemplatePatch {
   254  		return vs[0].(map[string]*ResourceClaimTemplatePatch)[vs[1].(string)]
   255  	}).(ResourceClaimTemplatePatchOutput)
   256  }
   257  
   258  func init() {
   259  	pulumi.RegisterInputType(reflect.TypeOf((*ResourceClaimTemplatePatchInput)(nil)).Elem(), &ResourceClaimTemplatePatch{})
   260  	pulumi.RegisterInputType(reflect.TypeOf((*ResourceClaimTemplatePatchArrayInput)(nil)).Elem(), ResourceClaimTemplatePatchArray{})
   261  	pulumi.RegisterInputType(reflect.TypeOf((*ResourceClaimTemplatePatchMapInput)(nil)).Elem(), ResourceClaimTemplatePatchMap{})
   262  	pulumi.RegisterOutputType(ResourceClaimTemplatePatchOutput{})
   263  	pulumi.RegisterOutputType(ResourceClaimTemplatePatchArrayOutput{})
   264  	pulumi.RegisterOutputType(ResourceClaimTemplatePatchMapOutput{})
   265  }