github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/certificates/v1alpha1/clusterTrustBundlePatch.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 v1alpha1
     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  // ClusterTrustBundle is a cluster-scoped container for X.509 trust anchors (root certificates).
    21  //
    22  // ClusterTrustBundle objects are considered to be readable by any authenticated user in the cluster, because they can be mounted by pods using the `clusterTrustBundle` projection.  All service accounts have read access to ClusterTrustBundles by default.  Users who only have namespace-level access to a cluster can read ClusterTrustBundles by impersonating a serviceaccount that they have access to.
    23  //
    24  // It can be optionally associated with a particular assigner, in which case it contains one valid set of trust anchors for that signer. Signers may have multiple associated ClusterTrustBundles; each is an independent set of trust anchors for that signer. Admission control is used to enforce that only users with permissions on the signer can create or modify the corresponding bundle.
    25  type ClusterTrustBundlePatch struct {
    26  	pulumi.CustomResourceState
    27  
    28  	// 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
    29  	ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"`
    30  	// 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
    31  	Kind pulumi.StringPtrOutput `pulumi:"kind"`
    32  	// metadata contains the object metadata.
    33  	Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"`
    34  	// spec contains the signer (if any) and trust anchors.
    35  	Spec ClusterTrustBundleSpecPatchPtrOutput `pulumi:"spec"`
    36  }
    37  
    38  // NewClusterTrustBundlePatch registers a new resource with the given unique name, arguments, and options.
    39  func NewClusterTrustBundlePatch(ctx *pulumi.Context,
    40  	name string, args *ClusterTrustBundlePatchArgs, opts ...pulumi.ResourceOption) (*ClusterTrustBundlePatch, error) {
    41  	if args == nil {
    42  		args = &ClusterTrustBundlePatchArgs{}
    43  	}
    44  
    45  	args.ApiVersion = pulumi.StringPtr("certificates.k8s.io/v1alpha1")
    46  	args.Kind = pulumi.StringPtr("ClusterTrustBundle")
    47  	var resource ClusterTrustBundlePatch
    48  	err := ctx.RegisterResource("kubernetes:certificates.k8s.io/v1alpha1:ClusterTrustBundlePatch", name, args, &resource, opts...)
    49  	if err != nil {
    50  		return nil, err
    51  	}
    52  	return &resource, nil
    53  }
    54  
    55  // GetClusterTrustBundlePatch gets an existing ClusterTrustBundlePatch resource's state with the given name, ID, and optional
    56  // state properties that are used to uniquely qualify the lookup (nil if not required).
    57  func GetClusterTrustBundlePatch(ctx *pulumi.Context,
    58  	name string, id pulumi.IDInput, state *ClusterTrustBundlePatchState, opts ...pulumi.ResourceOption) (*ClusterTrustBundlePatch, error) {
    59  	var resource ClusterTrustBundlePatch
    60  	err := ctx.ReadResource("kubernetes:certificates.k8s.io/v1alpha1:ClusterTrustBundlePatch", name, id, state, &resource, opts...)
    61  	if err != nil {
    62  		return nil, err
    63  	}
    64  	return &resource, nil
    65  }
    66  
    67  // Input properties used for looking up and filtering ClusterTrustBundlePatch resources.
    68  type clusterTrustBundlePatchState struct {
    69  }
    70  
    71  type ClusterTrustBundlePatchState struct {
    72  }
    73  
    74  func (ClusterTrustBundlePatchState) ElementType() reflect.Type {
    75  	return reflect.TypeOf((*clusterTrustBundlePatchState)(nil)).Elem()
    76  }
    77  
    78  type clusterTrustBundlePatchArgs struct {
    79  	// 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
    80  	ApiVersion *string `pulumi:"apiVersion"`
    81  	// 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
    82  	Kind *string `pulumi:"kind"`
    83  	// metadata contains the object metadata.
    84  	Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"`
    85  	// spec contains the signer (if any) and trust anchors.
    86  	Spec *ClusterTrustBundleSpecPatch `pulumi:"spec"`
    87  }
    88  
    89  // The set of arguments for constructing a ClusterTrustBundlePatch resource.
    90  type ClusterTrustBundlePatchArgs struct {
    91  	// 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
    92  	ApiVersion pulumi.StringPtrInput
    93  	// 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
    94  	Kind pulumi.StringPtrInput
    95  	// metadata contains the object metadata.
    96  	Metadata metav1.ObjectMetaPatchPtrInput
    97  	// spec contains the signer (if any) and trust anchors.
    98  	Spec ClusterTrustBundleSpecPatchPtrInput
    99  }
   100  
   101  func (ClusterTrustBundlePatchArgs) ElementType() reflect.Type {
   102  	return reflect.TypeOf((*clusterTrustBundlePatchArgs)(nil)).Elem()
   103  }
   104  
   105  type ClusterTrustBundlePatchInput interface {
   106  	pulumi.Input
   107  
   108  	ToClusterTrustBundlePatchOutput() ClusterTrustBundlePatchOutput
   109  	ToClusterTrustBundlePatchOutputWithContext(ctx context.Context) ClusterTrustBundlePatchOutput
   110  }
   111  
   112  func (*ClusterTrustBundlePatch) ElementType() reflect.Type {
   113  	return reflect.TypeOf((**ClusterTrustBundlePatch)(nil)).Elem()
   114  }
   115  
   116  func (i *ClusterTrustBundlePatch) ToClusterTrustBundlePatchOutput() ClusterTrustBundlePatchOutput {
   117  	return i.ToClusterTrustBundlePatchOutputWithContext(context.Background())
   118  }
   119  
   120  func (i *ClusterTrustBundlePatch) ToClusterTrustBundlePatchOutputWithContext(ctx context.Context) ClusterTrustBundlePatchOutput {
   121  	return pulumi.ToOutputWithContext(ctx, i).(ClusterTrustBundlePatchOutput)
   122  }
   123  
   124  // ClusterTrustBundlePatchArrayInput is an input type that accepts ClusterTrustBundlePatchArray and ClusterTrustBundlePatchArrayOutput values.
   125  // You can construct a concrete instance of `ClusterTrustBundlePatchArrayInput` via:
   126  //
   127  //	ClusterTrustBundlePatchArray{ ClusterTrustBundlePatchArgs{...} }
   128  type ClusterTrustBundlePatchArrayInput interface {
   129  	pulumi.Input
   130  
   131  	ToClusterTrustBundlePatchArrayOutput() ClusterTrustBundlePatchArrayOutput
   132  	ToClusterTrustBundlePatchArrayOutputWithContext(context.Context) ClusterTrustBundlePatchArrayOutput
   133  }
   134  
   135  type ClusterTrustBundlePatchArray []ClusterTrustBundlePatchInput
   136  
   137  func (ClusterTrustBundlePatchArray) ElementType() reflect.Type {
   138  	return reflect.TypeOf((*[]*ClusterTrustBundlePatch)(nil)).Elem()
   139  }
   140  
   141  func (i ClusterTrustBundlePatchArray) ToClusterTrustBundlePatchArrayOutput() ClusterTrustBundlePatchArrayOutput {
   142  	return i.ToClusterTrustBundlePatchArrayOutputWithContext(context.Background())
   143  }
   144  
   145  func (i ClusterTrustBundlePatchArray) ToClusterTrustBundlePatchArrayOutputWithContext(ctx context.Context) ClusterTrustBundlePatchArrayOutput {
   146  	return pulumi.ToOutputWithContext(ctx, i).(ClusterTrustBundlePatchArrayOutput)
   147  }
   148  
   149  // ClusterTrustBundlePatchMapInput is an input type that accepts ClusterTrustBundlePatchMap and ClusterTrustBundlePatchMapOutput values.
   150  // You can construct a concrete instance of `ClusterTrustBundlePatchMapInput` via:
   151  //
   152  //	ClusterTrustBundlePatchMap{ "key": ClusterTrustBundlePatchArgs{...} }
   153  type ClusterTrustBundlePatchMapInput interface {
   154  	pulumi.Input
   155  
   156  	ToClusterTrustBundlePatchMapOutput() ClusterTrustBundlePatchMapOutput
   157  	ToClusterTrustBundlePatchMapOutputWithContext(context.Context) ClusterTrustBundlePatchMapOutput
   158  }
   159  
   160  type ClusterTrustBundlePatchMap map[string]ClusterTrustBundlePatchInput
   161  
   162  func (ClusterTrustBundlePatchMap) ElementType() reflect.Type {
   163  	return reflect.TypeOf((*map[string]*ClusterTrustBundlePatch)(nil)).Elem()
   164  }
   165  
   166  func (i ClusterTrustBundlePatchMap) ToClusterTrustBundlePatchMapOutput() ClusterTrustBundlePatchMapOutput {
   167  	return i.ToClusterTrustBundlePatchMapOutputWithContext(context.Background())
   168  }
   169  
   170  func (i ClusterTrustBundlePatchMap) ToClusterTrustBundlePatchMapOutputWithContext(ctx context.Context) ClusterTrustBundlePatchMapOutput {
   171  	return pulumi.ToOutputWithContext(ctx, i).(ClusterTrustBundlePatchMapOutput)
   172  }
   173  
   174  type ClusterTrustBundlePatchOutput struct{ *pulumi.OutputState }
   175  
   176  func (ClusterTrustBundlePatchOutput) ElementType() reflect.Type {
   177  	return reflect.TypeOf((**ClusterTrustBundlePatch)(nil)).Elem()
   178  }
   179  
   180  func (o ClusterTrustBundlePatchOutput) ToClusterTrustBundlePatchOutput() ClusterTrustBundlePatchOutput {
   181  	return o
   182  }
   183  
   184  func (o ClusterTrustBundlePatchOutput) ToClusterTrustBundlePatchOutputWithContext(ctx context.Context) ClusterTrustBundlePatchOutput {
   185  	return o
   186  }
   187  
   188  // 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
   189  func (o ClusterTrustBundlePatchOutput) ApiVersion() pulumi.StringPtrOutput {
   190  	return o.ApplyT(func(v *ClusterTrustBundlePatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
   191  }
   192  
   193  // 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
   194  func (o ClusterTrustBundlePatchOutput) Kind() pulumi.StringPtrOutput {
   195  	return o.ApplyT(func(v *ClusterTrustBundlePatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   196  }
   197  
   198  // metadata contains the object metadata.
   199  func (o ClusterTrustBundlePatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput {
   200  	return o.ApplyT(func(v *ClusterTrustBundlePatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput)
   201  }
   202  
   203  // spec contains the signer (if any) and trust anchors.
   204  func (o ClusterTrustBundlePatchOutput) Spec() ClusterTrustBundleSpecPatchPtrOutput {
   205  	return o.ApplyT(func(v *ClusterTrustBundlePatch) ClusterTrustBundleSpecPatchPtrOutput { return v.Spec }).(ClusterTrustBundleSpecPatchPtrOutput)
   206  }
   207  
   208  type ClusterTrustBundlePatchArrayOutput struct{ *pulumi.OutputState }
   209  
   210  func (ClusterTrustBundlePatchArrayOutput) ElementType() reflect.Type {
   211  	return reflect.TypeOf((*[]*ClusterTrustBundlePatch)(nil)).Elem()
   212  }
   213  
   214  func (o ClusterTrustBundlePatchArrayOutput) ToClusterTrustBundlePatchArrayOutput() ClusterTrustBundlePatchArrayOutput {
   215  	return o
   216  }
   217  
   218  func (o ClusterTrustBundlePatchArrayOutput) ToClusterTrustBundlePatchArrayOutputWithContext(ctx context.Context) ClusterTrustBundlePatchArrayOutput {
   219  	return o
   220  }
   221  
   222  func (o ClusterTrustBundlePatchArrayOutput) Index(i pulumi.IntInput) ClusterTrustBundlePatchOutput {
   223  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ClusterTrustBundlePatch {
   224  		return vs[0].([]*ClusterTrustBundlePatch)[vs[1].(int)]
   225  	}).(ClusterTrustBundlePatchOutput)
   226  }
   227  
   228  type ClusterTrustBundlePatchMapOutput struct{ *pulumi.OutputState }
   229  
   230  func (ClusterTrustBundlePatchMapOutput) ElementType() reflect.Type {
   231  	return reflect.TypeOf((*map[string]*ClusterTrustBundlePatch)(nil)).Elem()
   232  }
   233  
   234  func (o ClusterTrustBundlePatchMapOutput) ToClusterTrustBundlePatchMapOutput() ClusterTrustBundlePatchMapOutput {
   235  	return o
   236  }
   237  
   238  func (o ClusterTrustBundlePatchMapOutput) ToClusterTrustBundlePatchMapOutputWithContext(ctx context.Context) ClusterTrustBundlePatchMapOutput {
   239  	return o
   240  }
   241  
   242  func (o ClusterTrustBundlePatchMapOutput) MapIndex(k pulumi.StringInput) ClusterTrustBundlePatchOutput {
   243  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ClusterTrustBundlePatch {
   244  		return vs[0].(map[string]*ClusterTrustBundlePatch)[vs[1].(string)]
   245  	}).(ClusterTrustBundlePatchOutput)
   246  }
   247  
   248  func init() {
   249  	pulumi.RegisterInputType(reflect.TypeOf((*ClusterTrustBundlePatchInput)(nil)).Elem(), &ClusterTrustBundlePatch{})
   250  	pulumi.RegisterInputType(reflect.TypeOf((*ClusterTrustBundlePatchArrayInput)(nil)).Elem(), ClusterTrustBundlePatchArray{})
   251  	pulumi.RegisterInputType(reflect.TypeOf((*ClusterTrustBundlePatchMapInput)(nil)).Elem(), ClusterTrustBundlePatchMap{})
   252  	pulumi.RegisterOutputType(ClusterTrustBundlePatchOutput{})
   253  	pulumi.RegisterOutputType(ClusterTrustBundlePatchArrayOutput{})
   254  	pulumi.RegisterOutputType(ClusterTrustBundlePatchMapOutput{})
   255  }