github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/certificates/v1/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 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 // CertificateSigningRequest objects provide a mechanism to obtain x509 certificates by submitting a certificate signing request, and having it asynchronously approved and issued. 21 // 22 // Kubelets use this API to obtain: 23 // 1. client certificates to authenticate to kube-apiserver (with the "kubernetes.io/kube-apiserver-client-kubelet" signerName). 24 // 2. serving certificates for TLS endpoints kube-apiserver can connect to securely (with the "kubernetes.io/kubelet-serving" signerName). 25 // 26 // This API can be used to request client certificates to authenticate to kube-apiserver (with the "kubernetes.io/kube-apiserver-client" signerName), or to obtain certificates from custom non-Kubernetes signers. 27 type CertificateSigningRequestPatch struct { 28 pulumi.CustomResourceState 29 30 // 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 31 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 32 // 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 33 Kind pulumi.StringPtrOutput `pulumi:"kind"` 34 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 35 // spec contains the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users. 36 Spec CertificateSigningRequestSpecPatchPtrOutput `pulumi:"spec"` 37 // status contains information about whether the request is approved or denied, and the certificate issued by the signer, or the failure condition indicating signer failure. 38 Status CertificateSigningRequestStatusPatchPtrOutput `pulumi:"status"` 39 } 40 41 // NewCertificateSigningRequestPatch registers a new resource with the given unique name, arguments, and options. 42 func NewCertificateSigningRequestPatch(ctx *pulumi.Context, 43 name string, args *CertificateSigningRequestPatchArgs, opts ...pulumi.ResourceOption) (*CertificateSigningRequestPatch, error) { 44 if args == nil { 45 args = &CertificateSigningRequestPatchArgs{} 46 } 47 48 args.ApiVersion = pulumi.StringPtr("certificates.k8s.io/v1") 49 args.Kind = pulumi.StringPtr("CertificateSigningRequest") 50 aliases := pulumi.Aliases([]pulumi.Alias{ 51 { 52 Type: pulumi.String("kubernetes:certificates.k8s.io/v1beta1:CertificateSigningRequestPatch"), 53 }, 54 }) 55 opts = append(opts, aliases) 56 var resource CertificateSigningRequestPatch 57 err := ctx.RegisterResource("kubernetes:certificates.k8s.io/v1:CertificateSigningRequestPatch", name, args, &resource, opts...) 58 if err != nil { 59 return nil, err 60 } 61 return &resource, nil 62 } 63 64 // GetCertificateSigningRequestPatch gets an existing CertificateSigningRequestPatch 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 GetCertificateSigningRequestPatch(ctx *pulumi.Context, 67 name string, id pulumi.IDInput, state *CertificateSigningRequestPatchState, opts ...pulumi.ResourceOption) (*CertificateSigningRequestPatch, error) { 68 var resource CertificateSigningRequestPatch 69 err := ctx.ReadResource("kubernetes:certificates.k8s.io/v1:CertificateSigningRequestPatch", 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 CertificateSigningRequestPatch resources. 77 type certificateSigningRequestPatchState struct { 78 } 79 80 type CertificateSigningRequestPatchState struct { 81 } 82 83 func (CertificateSigningRequestPatchState) ElementType() reflect.Type { 84 return reflect.TypeOf((*certificateSigningRequestPatchState)(nil)).Elem() 85 } 86 87 type certificateSigningRequestPatchArgs 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 the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users. 94 Spec *CertificateSigningRequestSpecPatch `pulumi:"spec"` 95 } 96 97 // The set of arguments for constructing a CertificateSigningRequestPatch resource. 98 type CertificateSigningRequestPatchArgs 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 the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users. 105 Spec CertificateSigningRequestSpecPatchPtrInput 106 } 107 108 func (CertificateSigningRequestPatchArgs) ElementType() reflect.Type { 109 return reflect.TypeOf((*certificateSigningRequestPatchArgs)(nil)).Elem() 110 } 111 112 type CertificateSigningRequestPatchInput interface { 113 pulumi.Input 114 115 ToCertificateSigningRequestPatchOutput() CertificateSigningRequestPatchOutput 116 ToCertificateSigningRequestPatchOutputWithContext(ctx context.Context) CertificateSigningRequestPatchOutput 117 } 118 119 func (*CertificateSigningRequestPatch) ElementType() reflect.Type { 120 return reflect.TypeOf((**CertificateSigningRequestPatch)(nil)).Elem() 121 } 122 123 func (i *CertificateSigningRequestPatch) ToCertificateSigningRequestPatchOutput() CertificateSigningRequestPatchOutput { 124 return i.ToCertificateSigningRequestPatchOutputWithContext(context.Background()) 125 } 126 127 func (i *CertificateSigningRequestPatch) ToCertificateSigningRequestPatchOutputWithContext(ctx context.Context) CertificateSigningRequestPatchOutput { 128 return pulumi.ToOutputWithContext(ctx, i).(CertificateSigningRequestPatchOutput) 129 } 130 131 // CertificateSigningRequestPatchArrayInput is an input type that accepts CertificateSigningRequestPatchArray and CertificateSigningRequestPatchArrayOutput values. 132 // You can construct a concrete instance of `CertificateSigningRequestPatchArrayInput` via: 133 // 134 // CertificateSigningRequestPatchArray{ CertificateSigningRequestPatchArgs{...} } 135 type CertificateSigningRequestPatchArrayInput interface { 136 pulumi.Input 137 138 ToCertificateSigningRequestPatchArrayOutput() CertificateSigningRequestPatchArrayOutput 139 ToCertificateSigningRequestPatchArrayOutputWithContext(context.Context) CertificateSigningRequestPatchArrayOutput 140 } 141 142 type CertificateSigningRequestPatchArray []CertificateSigningRequestPatchInput 143 144 func (CertificateSigningRequestPatchArray) ElementType() reflect.Type { 145 return reflect.TypeOf((*[]*CertificateSigningRequestPatch)(nil)).Elem() 146 } 147 148 func (i CertificateSigningRequestPatchArray) ToCertificateSigningRequestPatchArrayOutput() CertificateSigningRequestPatchArrayOutput { 149 return i.ToCertificateSigningRequestPatchArrayOutputWithContext(context.Background()) 150 } 151 152 func (i CertificateSigningRequestPatchArray) ToCertificateSigningRequestPatchArrayOutputWithContext(ctx context.Context) CertificateSigningRequestPatchArrayOutput { 153 return pulumi.ToOutputWithContext(ctx, i).(CertificateSigningRequestPatchArrayOutput) 154 } 155 156 // CertificateSigningRequestPatchMapInput is an input type that accepts CertificateSigningRequestPatchMap and CertificateSigningRequestPatchMapOutput values. 157 // You can construct a concrete instance of `CertificateSigningRequestPatchMapInput` via: 158 // 159 // CertificateSigningRequestPatchMap{ "key": CertificateSigningRequestPatchArgs{...} } 160 type CertificateSigningRequestPatchMapInput interface { 161 pulumi.Input 162 163 ToCertificateSigningRequestPatchMapOutput() CertificateSigningRequestPatchMapOutput 164 ToCertificateSigningRequestPatchMapOutputWithContext(context.Context) CertificateSigningRequestPatchMapOutput 165 } 166 167 type CertificateSigningRequestPatchMap map[string]CertificateSigningRequestPatchInput 168 169 func (CertificateSigningRequestPatchMap) ElementType() reflect.Type { 170 return reflect.TypeOf((*map[string]*CertificateSigningRequestPatch)(nil)).Elem() 171 } 172 173 func (i CertificateSigningRequestPatchMap) ToCertificateSigningRequestPatchMapOutput() CertificateSigningRequestPatchMapOutput { 174 return i.ToCertificateSigningRequestPatchMapOutputWithContext(context.Background()) 175 } 176 177 func (i CertificateSigningRequestPatchMap) ToCertificateSigningRequestPatchMapOutputWithContext(ctx context.Context) CertificateSigningRequestPatchMapOutput { 178 return pulumi.ToOutputWithContext(ctx, i).(CertificateSigningRequestPatchMapOutput) 179 } 180 181 type CertificateSigningRequestPatchOutput struct{ *pulumi.OutputState } 182 183 func (CertificateSigningRequestPatchOutput) ElementType() reflect.Type { 184 return reflect.TypeOf((**CertificateSigningRequestPatch)(nil)).Elem() 185 } 186 187 func (o CertificateSigningRequestPatchOutput) ToCertificateSigningRequestPatchOutput() CertificateSigningRequestPatchOutput { 188 return o 189 } 190 191 func (o CertificateSigningRequestPatchOutput) ToCertificateSigningRequestPatchOutputWithContext(ctx context.Context) CertificateSigningRequestPatchOutput { 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 CertificateSigningRequestPatchOutput) ApiVersion() pulumi.StringPtrOutput { 197 return o.ApplyT(func(v *CertificateSigningRequestPatch) 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 CertificateSigningRequestPatchOutput) Kind() pulumi.StringPtrOutput { 202 return o.ApplyT(func(v *CertificateSigningRequestPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 203 } 204 205 func (o CertificateSigningRequestPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 206 return o.ApplyT(func(v *CertificateSigningRequestPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 207 } 208 209 // spec contains the certificate request, and is immutable after creation. Only the request, signerName, expirationSeconds, and usages fields can be set on creation. Other fields are derived by Kubernetes and cannot be modified by users. 210 func (o CertificateSigningRequestPatchOutput) Spec() CertificateSigningRequestSpecPatchPtrOutput { 211 return o.ApplyT(func(v *CertificateSigningRequestPatch) CertificateSigningRequestSpecPatchPtrOutput { return v.Spec }).(CertificateSigningRequestSpecPatchPtrOutput) 212 } 213 214 // status contains information about whether the request is approved or denied, and the certificate issued by the signer, or the failure condition indicating signer failure. 215 func (o CertificateSigningRequestPatchOutput) Status() CertificateSigningRequestStatusPatchPtrOutput { 216 return o.ApplyT(func(v *CertificateSigningRequestPatch) CertificateSigningRequestStatusPatchPtrOutput { return v.Status }).(CertificateSigningRequestStatusPatchPtrOutput) 217 } 218 219 type CertificateSigningRequestPatchArrayOutput struct{ *pulumi.OutputState } 220 221 func (CertificateSigningRequestPatchArrayOutput) ElementType() reflect.Type { 222 return reflect.TypeOf((*[]*CertificateSigningRequestPatch)(nil)).Elem() 223 } 224 225 func (o CertificateSigningRequestPatchArrayOutput) ToCertificateSigningRequestPatchArrayOutput() CertificateSigningRequestPatchArrayOutput { 226 return o 227 } 228 229 func (o CertificateSigningRequestPatchArrayOutput) ToCertificateSigningRequestPatchArrayOutputWithContext(ctx context.Context) CertificateSigningRequestPatchArrayOutput { 230 return o 231 } 232 233 func (o CertificateSigningRequestPatchArrayOutput) Index(i pulumi.IntInput) CertificateSigningRequestPatchOutput { 234 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CertificateSigningRequestPatch { 235 return vs[0].([]*CertificateSigningRequestPatch)[vs[1].(int)] 236 }).(CertificateSigningRequestPatchOutput) 237 } 238 239 type CertificateSigningRequestPatchMapOutput struct{ *pulumi.OutputState } 240 241 func (CertificateSigningRequestPatchMapOutput) ElementType() reflect.Type { 242 return reflect.TypeOf((*map[string]*CertificateSigningRequestPatch)(nil)).Elem() 243 } 244 245 func (o CertificateSigningRequestPatchMapOutput) ToCertificateSigningRequestPatchMapOutput() CertificateSigningRequestPatchMapOutput { 246 return o 247 } 248 249 func (o CertificateSigningRequestPatchMapOutput) ToCertificateSigningRequestPatchMapOutputWithContext(ctx context.Context) CertificateSigningRequestPatchMapOutput { 250 return o 251 } 252 253 func (o CertificateSigningRequestPatchMapOutput) MapIndex(k pulumi.StringInput) CertificateSigningRequestPatchOutput { 254 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CertificateSigningRequestPatch { 255 return vs[0].(map[string]*CertificateSigningRequestPatch)[vs[1].(string)] 256 }).(CertificateSigningRequestPatchOutput) 257 } 258 259 func init() { 260 pulumi.RegisterInputType(reflect.TypeOf((*CertificateSigningRequestPatchInput)(nil)).Elem(), &CertificateSigningRequestPatch{}) 261 pulumi.RegisterInputType(reflect.TypeOf((*CertificateSigningRequestPatchArrayInput)(nil)).Elem(), CertificateSigningRequestPatchArray{}) 262 pulumi.RegisterInputType(reflect.TypeOf((*CertificateSigningRequestPatchMapInput)(nil)).Elem(), CertificateSigningRequestPatchMap{}) 263 pulumi.RegisterOutputType(CertificateSigningRequestPatchOutput{}) 264 pulumi.RegisterOutputType(CertificateSigningRequestPatchArrayOutput{}) 265 pulumi.RegisterOutputType(CertificateSigningRequestPatchMapOutput{}) 266 }