github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/apiregistration/v1beta1/apiservicePatch.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  // APIService represents a server for a particular GroupVersion. Name must be "version.group".
    21  type APIServicePatch 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  	Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"`
    29  	// Spec contains information for locating and communicating with a server
    30  	Spec APIServiceSpecPatchPtrOutput `pulumi:"spec"`
    31  	// Status contains derived information about an API server
    32  	Status APIServiceStatusPatchPtrOutput `pulumi:"status"`
    33  }
    34  
    35  // NewAPIServicePatch registers a new resource with the given unique name, arguments, and options.
    36  func NewAPIServicePatch(ctx *pulumi.Context,
    37  	name string, args *APIServicePatchArgs, opts ...pulumi.ResourceOption) (*APIServicePatch, error) {
    38  	if args == nil {
    39  		args = &APIServicePatchArgs{}
    40  	}
    41  
    42  	args.ApiVersion = pulumi.StringPtr("apiregistration.k8s.io/v1beta1")
    43  	args.Kind = pulumi.StringPtr("APIService")
    44  	aliases := pulumi.Aliases([]pulumi.Alias{
    45  		{
    46  			Type: pulumi.String("kubernetes:apiregistration.k8s.io/v1:APIServicePatch"),
    47  		},
    48  		{
    49  			Type: pulumi.String("kubernetes:apiregistration/v1:APIServicePatch"),
    50  		},
    51  		{
    52  			Type: pulumi.String("kubernetes:apiregistration/v1beta1:APIServicePatch"),
    53  		},
    54  	})
    55  	opts = append(opts, aliases)
    56  	var resource APIServicePatch
    57  	err := ctx.RegisterResource("kubernetes:apiregistration.k8s.io/v1beta1:APIServicePatch", name, args, &resource, opts...)
    58  	if err != nil {
    59  		return nil, err
    60  	}
    61  	return &resource, nil
    62  }
    63  
    64  // GetAPIServicePatch gets an existing APIServicePatch 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 GetAPIServicePatch(ctx *pulumi.Context,
    67  	name string, id pulumi.IDInput, state *APIServicePatchState, opts ...pulumi.ResourceOption) (*APIServicePatch, error) {
    68  	var resource APIServicePatch
    69  	err := ctx.ReadResource("kubernetes:apiregistration.k8s.io/v1beta1:APIServicePatch", 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 APIServicePatch resources.
    77  type apiservicePatchState struct {
    78  }
    79  
    80  type APIServicePatchState struct {
    81  }
    82  
    83  func (APIServicePatchState) ElementType() reflect.Type {
    84  	return reflect.TypeOf((*apiservicePatchState)(nil)).Elem()
    85  }
    86  
    87  type apiservicePatchArgs 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  	Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"`
    93  	// Spec contains information for locating and communicating with a server
    94  	Spec *APIServiceSpecPatch `pulumi:"spec"`
    95  }
    96  
    97  // The set of arguments for constructing a APIServicePatch resource.
    98  type APIServicePatchArgs struct {
    99  	// 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
   100  	ApiVersion pulumi.StringPtrInput
   101  	// 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
   102  	Kind     pulumi.StringPtrInput
   103  	Metadata metav1.ObjectMetaPatchPtrInput
   104  	// Spec contains information for locating and communicating with a server
   105  	Spec APIServiceSpecPatchPtrInput
   106  }
   107  
   108  func (APIServicePatchArgs) ElementType() reflect.Type {
   109  	return reflect.TypeOf((*apiservicePatchArgs)(nil)).Elem()
   110  }
   111  
   112  type APIServicePatchInput interface {
   113  	pulumi.Input
   114  
   115  	ToAPIServicePatchOutput() APIServicePatchOutput
   116  	ToAPIServicePatchOutputWithContext(ctx context.Context) APIServicePatchOutput
   117  }
   118  
   119  func (*APIServicePatch) ElementType() reflect.Type {
   120  	return reflect.TypeOf((**APIServicePatch)(nil)).Elem()
   121  }
   122  
   123  func (i *APIServicePatch) ToAPIServicePatchOutput() APIServicePatchOutput {
   124  	return i.ToAPIServicePatchOutputWithContext(context.Background())
   125  }
   126  
   127  func (i *APIServicePatch) ToAPIServicePatchOutputWithContext(ctx context.Context) APIServicePatchOutput {
   128  	return pulumi.ToOutputWithContext(ctx, i).(APIServicePatchOutput)
   129  }
   130  
   131  // APIServicePatchArrayInput is an input type that accepts APIServicePatchArray and APIServicePatchArrayOutput values.
   132  // You can construct a concrete instance of `APIServicePatchArrayInput` via:
   133  //
   134  //	APIServicePatchArray{ APIServicePatchArgs{...} }
   135  type APIServicePatchArrayInput interface {
   136  	pulumi.Input
   137  
   138  	ToAPIServicePatchArrayOutput() APIServicePatchArrayOutput
   139  	ToAPIServicePatchArrayOutputWithContext(context.Context) APIServicePatchArrayOutput
   140  }
   141  
   142  type APIServicePatchArray []APIServicePatchInput
   143  
   144  func (APIServicePatchArray) ElementType() reflect.Type {
   145  	return reflect.TypeOf((*[]*APIServicePatch)(nil)).Elem()
   146  }
   147  
   148  func (i APIServicePatchArray) ToAPIServicePatchArrayOutput() APIServicePatchArrayOutput {
   149  	return i.ToAPIServicePatchArrayOutputWithContext(context.Background())
   150  }
   151  
   152  func (i APIServicePatchArray) ToAPIServicePatchArrayOutputWithContext(ctx context.Context) APIServicePatchArrayOutput {
   153  	return pulumi.ToOutputWithContext(ctx, i).(APIServicePatchArrayOutput)
   154  }
   155  
   156  // APIServicePatchMapInput is an input type that accepts APIServicePatchMap and APIServicePatchMapOutput values.
   157  // You can construct a concrete instance of `APIServicePatchMapInput` via:
   158  //
   159  //	APIServicePatchMap{ "key": APIServicePatchArgs{...} }
   160  type APIServicePatchMapInput interface {
   161  	pulumi.Input
   162  
   163  	ToAPIServicePatchMapOutput() APIServicePatchMapOutput
   164  	ToAPIServicePatchMapOutputWithContext(context.Context) APIServicePatchMapOutput
   165  }
   166  
   167  type APIServicePatchMap map[string]APIServicePatchInput
   168  
   169  func (APIServicePatchMap) ElementType() reflect.Type {
   170  	return reflect.TypeOf((*map[string]*APIServicePatch)(nil)).Elem()
   171  }
   172  
   173  func (i APIServicePatchMap) ToAPIServicePatchMapOutput() APIServicePatchMapOutput {
   174  	return i.ToAPIServicePatchMapOutputWithContext(context.Background())
   175  }
   176  
   177  func (i APIServicePatchMap) ToAPIServicePatchMapOutputWithContext(ctx context.Context) APIServicePatchMapOutput {
   178  	return pulumi.ToOutputWithContext(ctx, i).(APIServicePatchMapOutput)
   179  }
   180  
   181  type APIServicePatchOutput struct{ *pulumi.OutputState }
   182  
   183  func (APIServicePatchOutput) ElementType() reflect.Type {
   184  	return reflect.TypeOf((**APIServicePatch)(nil)).Elem()
   185  }
   186  
   187  func (o APIServicePatchOutput) ToAPIServicePatchOutput() APIServicePatchOutput {
   188  	return o
   189  }
   190  
   191  func (o APIServicePatchOutput) ToAPIServicePatchOutputWithContext(ctx context.Context) APIServicePatchOutput {
   192  	return o
   193  }
   194  
   195  // 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
   196  func (o APIServicePatchOutput) ApiVersion() pulumi.StringPtrOutput {
   197  	return o.ApplyT(func(v *APIServicePatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
   198  }
   199  
   200  // 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
   201  func (o APIServicePatchOutput) Kind() pulumi.StringPtrOutput {
   202  	return o.ApplyT(func(v *APIServicePatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   203  }
   204  
   205  func (o APIServicePatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput {
   206  	return o.ApplyT(func(v *APIServicePatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput)
   207  }
   208  
   209  // Spec contains information for locating and communicating with a server
   210  func (o APIServicePatchOutput) Spec() APIServiceSpecPatchPtrOutput {
   211  	return o.ApplyT(func(v *APIServicePatch) APIServiceSpecPatchPtrOutput { return v.Spec }).(APIServiceSpecPatchPtrOutput)
   212  }
   213  
   214  // Status contains derived information about an API server
   215  func (o APIServicePatchOutput) Status() APIServiceStatusPatchPtrOutput {
   216  	return o.ApplyT(func(v *APIServicePatch) APIServiceStatusPatchPtrOutput { return v.Status }).(APIServiceStatusPatchPtrOutput)
   217  }
   218  
   219  type APIServicePatchArrayOutput struct{ *pulumi.OutputState }
   220  
   221  func (APIServicePatchArrayOutput) ElementType() reflect.Type {
   222  	return reflect.TypeOf((*[]*APIServicePatch)(nil)).Elem()
   223  }
   224  
   225  func (o APIServicePatchArrayOutput) ToAPIServicePatchArrayOutput() APIServicePatchArrayOutput {
   226  	return o
   227  }
   228  
   229  func (o APIServicePatchArrayOutput) ToAPIServicePatchArrayOutputWithContext(ctx context.Context) APIServicePatchArrayOutput {
   230  	return o
   231  }
   232  
   233  func (o APIServicePatchArrayOutput) Index(i pulumi.IntInput) APIServicePatchOutput {
   234  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *APIServicePatch {
   235  		return vs[0].([]*APIServicePatch)[vs[1].(int)]
   236  	}).(APIServicePatchOutput)
   237  }
   238  
   239  type APIServicePatchMapOutput struct{ *pulumi.OutputState }
   240  
   241  func (APIServicePatchMapOutput) ElementType() reflect.Type {
   242  	return reflect.TypeOf((*map[string]*APIServicePatch)(nil)).Elem()
   243  }
   244  
   245  func (o APIServicePatchMapOutput) ToAPIServicePatchMapOutput() APIServicePatchMapOutput {
   246  	return o
   247  }
   248  
   249  func (o APIServicePatchMapOutput) ToAPIServicePatchMapOutputWithContext(ctx context.Context) APIServicePatchMapOutput {
   250  	return o
   251  }
   252  
   253  func (o APIServicePatchMapOutput) MapIndex(k pulumi.StringInput) APIServicePatchOutput {
   254  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *APIServicePatch {
   255  		return vs[0].(map[string]*APIServicePatch)[vs[1].(string)]
   256  	}).(APIServicePatchOutput)
   257  }
   258  
   259  func init() {
   260  	pulumi.RegisterInputType(reflect.TypeOf((*APIServicePatchInput)(nil)).Elem(), &APIServicePatch{})
   261  	pulumi.RegisterInputType(reflect.TypeOf((*APIServicePatchArrayInput)(nil)).Elem(), APIServicePatchArray{})
   262  	pulumi.RegisterInputType(reflect.TypeOf((*APIServicePatchMapInput)(nil)).Elem(), APIServicePatchMap{})
   263  	pulumi.RegisterOutputType(APIServicePatchOutput{})
   264  	pulumi.RegisterOutputType(APIServicePatchArrayOutput{})
   265  	pulumi.RegisterOutputType(APIServicePatchMapOutput{})
   266  }