github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/certificates/v1beta1/certificateSigningRequestPatch.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  // Describes a certificate signing request
    21  type CertificateSigningRequestPatch 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  	// The certificate request itself and any additional information.
    30  	Spec CertificateSigningRequestSpecPatchPtrOutput `pulumi:"spec"`
    31  	// Derived information about the request.
    32  	Status CertificateSigningRequestStatusPatchPtrOutput `pulumi:"status"`
    33  }
    34  
    35  // NewCertificateSigningRequestPatch registers a new resource with the given unique name, arguments, and options.
    36  func NewCertificateSigningRequestPatch(ctx *pulumi.Context,
    37  	name string, args *CertificateSigningRequestPatchArgs, opts ...pulumi.ResourceOption) (*CertificateSigningRequestPatch, error) {
    38  	if args == nil {
    39  		args = &CertificateSigningRequestPatchArgs{}
    40  	}
    41  
    42  	args.ApiVersion = pulumi.StringPtr("certificates.k8s.io/v1beta1")
    43  	args.Kind = pulumi.StringPtr("CertificateSigningRequest")
    44  	aliases := pulumi.Aliases([]pulumi.Alias{
    45  		{
    46  			Type: pulumi.String("kubernetes:certificates.k8s.io/v1:CertificateSigningRequestPatch"),
    47  		},
    48  	})
    49  	opts = append(opts, aliases)
    50  	var resource CertificateSigningRequestPatch
    51  	err := ctx.RegisterResource("kubernetes:certificates.k8s.io/v1beta1:CertificateSigningRequestPatch", name, args, &resource, opts...)
    52  	if err != nil {
    53  		return nil, err
    54  	}
    55  	return &resource, nil
    56  }
    57  
    58  // GetCertificateSigningRequestPatch gets an existing CertificateSigningRequestPatch resource's state with the given name, ID, and optional
    59  // state properties that are used to uniquely qualify the lookup (nil if not required).
    60  func GetCertificateSigningRequestPatch(ctx *pulumi.Context,
    61  	name string, id pulumi.IDInput, state *CertificateSigningRequestPatchState, opts ...pulumi.ResourceOption) (*CertificateSigningRequestPatch, error) {
    62  	var resource CertificateSigningRequestPatch
    63  	err := ctx.ReadResource("kubernetes:certificates.k8s.io/v1beta1:CertificateSigningRequestPatch", name, id, state, &resource, opts...)
    64  	if err != nil {
    65  		return nil, err
    66  	}
    67  	return &resource, nil
    68  }
    69  
    70  // Input properties used for looking up and filtering CertificateSigningRequestPatch resources.
    71  type certificateSigningRequestPatchState struct {
    72  }
    73  
    74  type CertificateSigningRequestPatchState struct {
    75  }
    76  
    77  func (CertificateSigningRequestPatchState) ElementType() reflect.Type {
    78  	return reflect.TypeOf((*certificateSigningRequestPatchState)(nil)).Elem()
    79  }
    80  
    81  type certificateSigningRequestPatchArgs struct {
    82  	// 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
    83  	ApiVersion *string `pulumi:"apiVersion"`
    84  	// 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
    85  	Kind     *string                 `pulumi:"kind"`
    86  	Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"`
    87  	// The certificate request itself and any additional information.
    88  	Spec *CertificateSigningRequestSpecPatch `pulumi:"spec"`
    89  }
    90  
    91  // The set of arguments for constructing a CertificateSigningRequestPatch resource.
    92  type CertificateSigningRequestPatchArgs 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  	Metadata metav1.ObjectMetaPatchPtrInput
    98  	// The certificate request itself and any additional information.
    99  	Spec CertificateSigningRequestSpecPatchPtrInput
   100  }
   101  
   102  func (CertificateSigningRequestPatchArgs) ElementType() reflect.Type {
   103  	return reflect.TypeOf((*certificateSigningRequestPatchArgs)(nil)).Elem()
   104  }
   105  
   106  type CertificateSigningRequestPatchInput interface {
   107  	pulumi.Input
   108  
   109  	ToCertificateSigningRequestPatchOutput() CertificateSigningRequestPatchOutput
   110  	ToCertificateSigningRequestPatchOutputWithContext(ctx context.Context) CertificateSigningRequestPatchOutput
   111  }
   112  
   113  func (*CertificateSigningRequestPatch) ElementType() reflect.Type {
   114  	return reflect.TypeOf((**CertificateSigningRequestPatch)(nil)).Elem()
   115  }
   116  
   117  func (i *CertificateSigningRequestPatch) ToCertificateSigningRequestPatchOutput() CertificateSigningRequestPatchOutput {
   118  	return i.ToCertificateSigningRequestPatchOutputWithContext(context.Background())
   119  }
   120  
   121  func (i *CertificateSigningRequestPatch) ToCertificateSigningRequestPatchOutputWithContext(ctx context.Context) CertificateSigningRequestPatchOutput {
   122  	return pulumi.ToOutputWithContext(ctx, i).(CertificateSigningRequestPatchOutput)
   123  }
   124  
   125  // CertificateSigningRequestPatchArrayInput is an input type that accepts CertificateSigningRequestPatchArray and CertificateSigningRequestPatchArrayOutput values.
   126  // You can construct a concrete instance of `CertificateSigningRequestPatchArrayInput` via:
   127  //
   128  //	CertificateSigningRequestPatchArray{ CertificateSigningRequestPatchArgs{...} }
   129  type CertificateSigningRequestPatchArrayInput interface {
   130  	pulumi.Input
   131  
   132  	ToCertificateSigningRequestPatchArrayOutput() CertificateSigningRequestPatchArrayOutput
   133  	ToCertificateSigningRequestPatchArrayOutputWithContext(context.Context) CertificateSigningRequestPatchArrayOutput
   134  }
   135  
   136  type CertificateSigningRequestPatchArray []CertificateSigningRequestPatchInput
   137  
   138  func (CertificateSigningRequestPatchArray) ElementType() reflect.Type {
   139  	return reflect.TypeOf((*[]*CertificateSigningRequestPatch)(nil)).Elem()
   140  }
   141  
   142  func (i CertificateSigningRequestPatchArray) ToCertificateSigningRequestPatchArrayOutput() CertificateSigningRequestPatchArrayOutput {
   143  	return i.ToCertificateSigningRequestPatchArrayOutputWithContext(context.Background())
   144  }
   145  
   146  func (i CertificateSigningRequestPatchArray) ToCertificateSigningRequestPatchArrayOutputWithContext(ctx context.Context) CertificateSigningRequestPatchArrayOutput {
   147  	return pulumi.ToOutputWithContext(ctx, i).(CertificateSigningRequestPatchArrayOutput)
   148  }
   149  
   150  // CertificateSigningRequestPatchMapInput is an input type that accepts CertificateSigningRequestPatchMap and CertificateSigningRequestPatchMapOutput values.
   151  // You can construct a concrete instance of `CertificateSigningRequestPatchMapInput` via:
   152  //
   153  //	CertificateSigningRequestPatchMap{ "key": CertificateSigningRequestPatchArgs{...} }
   154  type CertificateSigningRequestPatchMapInput interface {
   155  	pulumi.Input
   156  
   157  	ToCertificateSigningRequestPatchMapOutput() CertificateSigningRequestPatchMapOutput
   158  	ToCertificateSigningRequestPatchMapOutputWithContext(context.Context) CertificateSigningRequestPatchMapOutput
   159  }
   160  
   161  type CertificateSigningRequestPatchMap map[string]CertificateSigningRequestPatchInput
   162  
   163  func (CertificateSigningRequestPatchMap) ElementType() reflect.Type {
   164  	return reflect.TypeOf((*map[string]*CertificateSigningRequestPatch)(nil)).Elem()
   165  }
   166  
   167  func (i CertificateSigningRequestPatchMap) ToCertificateSigningRequestPatchMapOutput() CertificateSigningRequestPatchMapOutput {
   168  	return i.ToCertificateSigningRequestPatchMapOutputWithContext(context.Background())
   169  }
   170  
   171  func (i CertificateSigningRequestPatchMap) ToCertificateSigningRequestPatchMapOutputWithContext(ctx context.Context) CertificateSigningRequestPatchMapOutput {
   172  	return pulumi.ToOutputWithContext(ctx, i).(CertificateSigningRequestPatchMapOutput)
   173  }
   174  
   175  type CertificateSigningRequestPatchOutput struct{ *pulumi.OutputState }
   176  
   177  func (CertificateSigningRequestPatchOutput) ElementType() reflect.Type {
   178  	return reflect.TypeOf((**CertificateSigningRequestPatch)(nil)).Elem()
   179  }
   180  
   181  func (o CertificateSigningRequestPatchOutput) ToCertificateSigningRequestPatchOutput() CertificateSigningRequestPatchOutput {
   182  	return o
   183  }
   184  
   185  func (o CertificateSigningRequestPatchOutput) ToCertificateSigningRequestPatchOutputWithContext(ctx context.Context) CertificateSigningRequestPatchOutput {
   186  	return o
   187  }
   188  
   189  // 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
   190  func (o CertificateSigningRequestPatchOutput) ApiVersion() pulumi.StringPtrOutput {
   191  	return o.ApplyT(func(v *CertificateSigningRequestPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
   192  }
   193  
   194  // 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
   195  func (o CertificateSigningRequestPatchOutput) Kind() pulumi.StringPtrOutput {
   196  	return o.ApplyT(func(v *CertificateSigningRequestPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   197  }
   198  
   199  func (o CertificateSigningRequestPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput {
   200  	return o.ApplyT(func(v *CertificateSigningRequestPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput)
   201  }
   202  
   203  // The certificate request itself and any additional information.
   204  func (o CertificateSigningRequestPatchOutput) Spec() CertificateSigningRequestSpecPatchPtrOutput {
   205  	return o.ApplyT(func(v *CertificateSigningRequestPatch) CertificateSigningRequestSpecPatchPtrOutput { return v.Spec }).(CertificateSigningRequestSpecPatchPtrOutput)
   206  }
   207  
   208  // Derived information about the request.
   209  func (o CertificateSigningRequestPatchOutput) Status() CertificateSigningRequestStatusPatchPtrOutput {
   210  	return o.ApplyT(func(v *CertificateSigningRequestPatch) CertificateSigningRequestStatusPatchPtrOutput { return v.Status }).(CertificateSigningRequestStatusPatchPtrOutput)
   211  }
   212  
   213  type CertificateSigningRequestPatchArrayOutput struct{ *pulumi.OutputState }
   214  
   215  func (CertificateSigningRequestPatchArrayOutput) ElementType() reflect.Type {
   216  	return reflect.TypeOf((*[]*CertificateSigningRequestPatch)(nil)).Elem()
   217  }
   218  
   219  func (o CertificateSigningRequestPatchArrayOutput) ToCertificateSigningRequestPatchArrayOutput() CertificateSigningRequestPatchArrayOutput {
   220  	return o
   221  }
   222  
   223  func (o CertificateSigningRequestPatchArrayOutput) ToCertificateSigningRequestPatchArrayOutputWithContext(ctx context.Context) CertificateSigningRequestPatchArrayOutput {
   224  	return o
   225  }
   226  
   227  func (o CertificateSigningRequestPatchArrayOutput) Index(i pulumi.IntInput) CertificateSigningRequestPatchOutput {
   228  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CertificateSigningRequestPatch {
   229  		return vs[0].([]*CertificateSigningRequestPatch)[vs[1].(int)]
   230  	}).(CertificateSigningRequestPatchOutput)
   231  }
   232  
   233  type CertificateSigningRequestPatchMapOutput struct{ *pulumi.OutputState }
   234  
   235  func (CertificateSigningRequestPatchMapOutput) ElementType() reflect.Type {
   236  	return reflect.TypeOf((*map[string]*CertificateSigningRequestPatch)(nil)).Elem()
   237  }
   238  
   239  func (o CertificateSigningRequestPatchMapOutput) ToCertificateSigningRequestPatchMapOutput() CertificateSigningRequestPatchMapOutput {
   240  	return o
   241  }
   242  
   243  func (o CertificateSigningRequestPatchMapOutput) ToCertificateSigningRequestPatchMapOutputWithContext(ctx context.Context) CertificateSigningRequestPatchMapOutput {
   244  	return o
   245  }
   246  
   247  func (o CertificateSigningRequestPatchMapOutput) MapIndex(k pulumi.StringInput) CertificateSigningRequestPatchOutput {
   248  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CertificateSigningRequestPatch {
   249  		return vs[0].(map[string]*CertificateSigningRequestPatch)[vs[1].(string)]
   250  	}).(CertificateSigningRequestPatchOutput)
   251  }
   252  
   253  func init() {
   254  	pulumi.RegisterInputType(reflect.TypeOf((*CertificateSigningRequestPatchInput)(nil)).Elem(), &CertificateSigningRequestPatch{})
   255  	pulumi.RegisterInputType(reflect.TypeOf((*CertificateSigningRequestPatchArrayInput)(nil)).Elem(), CertificateSigningRequestPatchArray{})
   256  	pulumi.RegisterInputType(reflect.TypeOf((*CertificateSigningRequestPatchMapInput)(nil)).Elem(), CertificateSigningRequestPatchMap{})
   257  	pulumi.RegisterOutputType(CertificateSigningRequestPatchOutput{})
   258  	pulumi.RegisterOutputType(CertificateSigningRequestPatchArrayOutput{})
   259  	pulumi.RegisterOutputType(CertificateSigningRequestPatchMapOutput{})
   260  }