github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/core/v1/resourceQuotaPatch.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  // ResourceQuota sets aggregate quota restrictions enforced per namespace
    21  type ResourceQuotaPatch 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 quota. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    31  	Spec ResourceQuotaSpecPatchPtrOutput `pulumi:"spec"`
    32  	// Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    33  	Status ResourceQuotaStatusPatchPtrOutput `pulumi:"status"`
    34  }
    35  
    36  // NewResourceQuotaPatch registers a new resource with the given unique name, arguments, and options.
    37  func NewResourceQuotaPatch(ctx *pulumi.Context,
    38  	name string, args *ResourceQuotaPatchArgs, opts ...pulumi.ResourceOption) (*ResourceQuotaPatch, error) {
    39  	if args == nil {
    40  		args = &ResourceQuotaPatchArgs{}
    41  	}
    42  
    43  	args.ApiVersion = pulumi.StringPtr("v1")
    44  	args.Kind = pulumi.StringPtr("ResourceQuota")
    45  	var resource ResourceQuotaPatch
    46  	err := ctx.RegisterResource("kubernetes:core/v1:ResourceQuotaPatch", name, args, &resource, opts...)
    47  	if err != nil {
    48  		return nil, err
    49  	}
    50  	return &resource, nil
    51  }
    52  
    53  // GetResourceQuotaPatch gets an existing ResourceQuotaPatch 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 GetResourceQuotaPatch(ctx *pulumi.Context,
    56  	name string, id pulumi.IDInput, state *ResourceQuotaPatchState, opts ...pulumi.ResourceOption) (*ResourceQuotaPatch, error) {
    57  	var resource ResourceQuotaPatch
    58  	err := ctx.ReadResource("kubernetes:core/v1:ResourceQuotaPatch", 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 ResourceQuotaPatch resources.
    66  type resourceQuotaPatchState struct {
    67  }
    68  
    69  type ResourceQuotaPatchState struct {
    70  }
    71  
    72  func (ResourceQuotaPatchState) ElementType() reflect.Type {
    73  	return reflect.TypeOf((*resourceQuotaPatchState)(nil)).Elem()
    74  }
    75  
    76  type resourceQuotaPatchArgs 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 quota. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    84  	Spec *ResourceQuotaSpecPatch `pulumi:"spec"`
    85  }
    86  
    87  // The set of arguments for constructing a ResourceQuotaPatch resource.
    88  type ResourceQuotaPatchArgs 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 quota. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    96  	Spec ResourceQuotaSpecPatchPtrInput
    97  }
    98  
    99  func (ResourceQuotaPatchArgs) ElementType() reflect.Type {
   100  	return reflect.TypeOf((*resourceQuotaPatchArgs)(nil)).Elem()
   101  }
   102  
   103  type ResourceQuotaPatchInput interface {
   104  	pulumi.Input
   105  
   106  	ToResourceQuotaPatchOutput() ResourceQuotaPatchOutput
   107  	ToResourceQuotaPatchOutputWithContext(ctx context.Context) ResourceQuotaPatchOutput
   108  }
   109  
   110  func (*ResourceQuotaPatch) ElementType() reflect.Type {
   111  	return reflect.TypeOf((**ResourceQuotaPatch)(nil)).Elem()
   112  }
   113  
   114  func (i *ResourceQuotaPatch) ToResourceQuotaPatchOutput() ResourceQuotaPatchOutput {
   115  	return i.ToResourceQuotaPatchOutputWithContext(context.Background())
   116  }
   117  
   118  func (i *ResourceQuotaPatch) ToResourceQuotaPatchOutputWithContext(ctx context.Context) ResourceQuotaPatchOutput {
   119  	return pulumi.ToOutputWithContext(ctx, i).(ResourceQuotaPatchOutput)
   120  }
   121  
   122  // ResourceQuotaPatchArrayInput is an input type that accepts ResourceQuotaPatchArray and ResourceQuotaPatchArrayOutput values.
   123  // You can construct a concrete instance of `ResourceQuotaPatchArrayInput` via:
   124  //
   125  //	ResourceQuotaPatchArray{ ResourceQuotaPatchArgs{...} }
   126  type ResourceQuotaPatchArrayInput interface {
   127  	pulumi.Input
   128  
   129  	ToResourceQuotaPatchArrayOutput() ResourceQuotaPatchArrayOutput
   130  	ToResourceQuotaPatchArrayOutputWithContext(context.Context) ResourceQuotaPatchArrayOutput
   131  }
   132  
   133  type ResourceQuotaPatchArray []ResourceQuotaPatchInput
   134  
   135  func (ResourceQuotaPatchArray) ElementType() reflect.Type {
   136  	return reflect.TypeOf((*[]*ResourceQuotaPatch)(nil)).Elem()
   137  }
   138  
   139  func (i ResourceQuotaPatchArray) ToResourceQuotaPatchArrayOutput() ResourceQuotaPatchArrayOutput {
   140  	return i.ToResourceQuotaPatchArrayOutputWithContext(context.Background())
   141  }
   142  
   143  func (i ResourceQuotaPatchArray) ToResourceQuotaPatchArrayOutputWithContext(ctx context.Context) ResourceQuotaPatchArrayOutput {
   144  	return pulumi.ToOutputWithContext(ctx, i).(ResourceQuotaPatchArrayOutput)
   145  }
   146  
   147  // ResourceQuotaPatchMapInput is an input type that accepts ResourceQuotaPatchMap and ResourceQuotaPatchMapOutput values.
   148  // You can construct a concrete instance of `ResourceQuotaPatchMapInput` via:
   149  //
   150  //	ResourceQuotaPatchMap{ "key": ResourceQuotaPatchArgs{...} }
   151  type ResourceQuotaPatchMapInput interface {
   152  	pulumi.Input
   153  
   154  	ToResourceQuotaPatchMapOutput() ResourceQuotaPatchMapOutput
   155  	ToResourceQuotaPatchMapOutputWithContext(context.Context) ResourceQuotaPatchMapOutput
   156  }
   157  
   158  type ResourceQuotaPatchMap map[string]ResourceQuotaPatchInput
   159  
   160  func (ResourceQuotaPatchMap) ElementType() reflect.Type {
   161  	return reflect.TypeOf((*map[string]*ResourceQuotaPatch)(nil)).Elem()
   162  }
   163  
   164  func (i ResourceQuotaPatchMap) ToResourceQuotaPatchMapOutput() ResourceQuotaPatchMapOutput {
   165  	return i.ToResourceQuotaPatchMapOutputWithContext(context.Background())
   166  }
   167  
   168  func (i ResourceQuotaPatchMap) ToResourceQuotaPatchMapOutputWithContext(ctx context.Context) ResourceQuotaPatchMapOutput {
   169  	return pulumi.ToOutputWithContext(ctx, i).(ResourceQuotaPatchMapOutput)
   170  }
   171  
   172  type ResourceQuotaPatchOutput struct{ *pulumi.OutputState }
   173  
   174  func (ResourceQuotaPatchOutput) ElementType() reflect.Type {
   175  	return reflect.TypeOf((**ResourceQuotaPatch)(nil)).Elem()
   176  }
   177  
   178  func (o ResourceQuotaPatchOutput) ToResourceQuotaPatchOutput() ResourceQuotaPatchOutput {
   179  	return o
   180  }
   181  
   182  func (o ResourceQuotaPatchOutput) ToResourceQuotaPatchOutputWithContext(ctx context.Context) ResourceQuotaPatchOutput {
   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 ResourceQuotaPatchOutput) ApiVersion() pulumi.StringPtrOutput {
   188  	return o.ApplyT(func(v *ResourceQuotaPatch) 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 ResourceQuotaPatchOutput) Kind() pulumi.StringPtrOutput {
   193  	return o.ApplyT(func(v *ResourceQuotaPatch) 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 ResourceQuotaPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput {
   198  	return o.ApplyT(func(v *ResourceQuotaPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput)
   199  }
   200  
   201  // Spec defines the desired quota. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
   202  func (o ResourceQuotaPatchOutput) Spec() ResourceQuotaSpecPatchPtrOutput {
   203  	return o.ApplyT(func(v *ResourceQuotaPatch) ResourceQuotaSpecPatchPtrOutput { return v.Spec }).(ResourceQuotaSpecPatchPtrOutput)
   204  }
   205  
   206  // Status defines the actual enforced quota and its current usage. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
   207  func (o ResourceQuotaPatchOutput) Status() ResourceQuotaStatusPatchPtrOutput {
   208  	return o.ApplyT(func(v *ResourceQuotaPatch) ResourceQuotaStatusPatchPtrOutput { return v.Status }).(ResourceQuotaStatusPatchPtrOutput)
   209  }
   210  
   211  type ResourceQuotaPatchArrayOutput struct{ *pulumi.OutputState }
   212  
   213  func (ResourceQuotaPatchArrayOutput) ElementType() reflect.Type {
   214  	return reflect.TypeOf((*[]*ResourceQuotaPatch)(nil)).Elem()
   215  }
   216  
   217  func (o ResourceQuotaPatchArrayOutput) ToResourceQuotaPatchArrayOutput() ResourceQuotaPatchArrayOutput {
   218  	return o
   219  }
   220  
   221  func (o ResourceQuotaPatchArrayOutput) ToResourceQuotaPatchArrayOutputWithContext(ctx context.Context) ResourceQuotaPatchArrayOutput {
   222  	return o
   223  }
   224  
   225  func (o ResourceQuotaPatchArrayOutput) Index(i pulumi.IntInput) ResourceQuotaPatchOutput {
   226  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ResourceQuotaPatch {
   227  		return vs[0].([]*ResourceQuotaPatch)[vs[1].(int)]
   228  	}).(ResourceQuotaPatchOutput)
   229  }
   230  
   231  type ResourceQuotaPatchMapOutput struct{ *pulumi.OutputState }
   232  
   233  func (ResourceQuotaPatchMapOutput) ElementType() reflect.Type {
   234  	return reflect.TypeOf((*map[string]*ResourceQuotaPatch)(nil)).Elem()
   235  }
   236  
   237  func (o ResourceQuotaPatchMapOutput) ToResourceQuotaPatchMapOutput() ResourceQuotaPatchMapOutput {
   238  	return o
   239  }
   240  
   241  func (o ResourceQuotaPatchMapOutput) ToResourceQuotaPatchMapOutputWithContext(ctx context.Context) ResourceQuotaPatchMapOutput {
   242  	return o
   243  }
   244  
   245  func (o ResourceQuotaPatchMapOutput) MapIndex(k pulumi.StringInput) ResourceQuotaPatchOutput {
   246  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ResourceQuotaPatch {
   247  		return vs[0].(map[string]*ResourceQuotaPatch)[vs[1].(string)]
   248  	}).(ResourceQuotaPatchOutput)
   249  }
   250  
   251  func init() {
   252  	pulumi.RegisterInputType(reflect.TypeOf((*ResourceQuotaPatchInput)(nil)).Elem(), &ResourceQuotaPatch{})
   253  	pulumi.RegisterInputType(reflect.TypeOf((*ResourceQuotaPatchArrayInput)(nil)).Elem(), ResourceQuotaPatchArray{})
   254  	pulumi.RegisterInputType(reflect.TypeOf((*ResourceQuotaPatchMapInput)(nil)).Elem(), ResourceQuotaPatchMap{})
   255  	pulumi.RegisterOutputType(ResourceQuotaPatchOutput{})
   256  	pulumi.RegisterOutputType(ResourceQuotaPatchArrayOutput{})
   257  	pulumi.RegisterOutputType(ResourceQuotaPatchMapOutput{})
   258  }