github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/auditregistration/v1alpha1/auditSinkPatch.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  // AuditSink represents a cluster level audit sink
    21  type AuditSinkPatch 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 defines the audit configuration spec
    30  	Spec AuditSinkSpecPatchPtrOutput `pulumi:"spec"`
    31  }
    32  
    33  // NewAuditSinkPatch registers a new resource with the given unique name, arguments, and options.
    34  func NewAuditSinkPatch(ctx *pulumi.Context,
    35  	name string, args *AuditSinkPatchArgs, opts ...pulumi.ResourceOption) (*AuditSinkPatch, error) {
    36  	if args == nil {
    37  		args = &AuditSinkPatchArgs{}
    38  	}
    39  
    40  	args.ApiVersion = pulumi.StringPtr("auditregistration.k8s.io/v1alpha1")
    41  	args.Kind = pulumi.StringPtr("AuditSink")
    42  	var resource AuditSinkPatch
    43  	err := ctx.RegisterResource("kubernetes:auditregistration.k8s.io/v1alpha1:AuditSinkPatch", name, args, &resource, opts...)
    44  	if err != nil {
    45  		return nil, err
    46  	}
    47  	return &resource, nil
    48  }
    49  
    50  // GetAuditSinkPatch gets an existing AuditSinkPatch resource's state with the given name, ID, and optional
    51  // state properties that are used to uniquely qualify the lookup (nil if not required).
    52  func GetAuditSinkPatch(ctx *pulumi.Context,
    53  	name string, id pulumi.IDInput, state *AuditSinkPatchState, opts ...pulumi.ResourceOption) (*AuditSinkPatch, error) {
    54  	var resource AuditSinkPatch
    55  	err := ctx.ReadResource("kubernetes:auditregistration.k8s.io/v1alpha1:AuditSinkPatch", name, id, state, &resource, opts...)
    56  	if err != nil {
    57  		return nil, err
    58  	}
    59  	return &resource, nil
    60  }
    61  
    62  // Input properties used for looking up and filtering AuditSinkPatch resources.
    63  type auditSinkPatchState struct {
    64  }
    65  
    66  type AuditSinkPatchState struct {
    67  }
    68  
    69  func (AuditSinkPatchState) ElementType() reflect.Type {
    70  	return reflect.TypeOf((*auditSinkPatchState)(nil)).Elem()
    71  }
    72  
    73  type auditSinkPatchArgs struct {
    74  	// 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
    75  	ApiVersion *string `pulumi:"apiVersion"`
    76  	// 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
    77  	Kind     *string                 `pulumi:"kind"`
    78  	Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"`
    79  	// Spec defines the audit configuration spec
    80  	Spec *AuditSinkSpecPatch `pulumi:"spec"`
    81  }
    82  
    83  // The set of arguments for constructing a AuditSinkPatch resource.
    84  type AuditSinkPatchArgs struct {
    85  	// 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
    86  	ApiVersion pulumi.StringPtrInput
    87  	// 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
    88  	Kind     pulumi.StringPtrInput
    89  	Metadata metav1.ObjectMetaPatchPtrInput
    90  	// Spec defines the audit configuration spec
    91  	Spec AuditSinkSpecPatchPtrInput
    92  }
    93  
    94  func (AuditSinkPatchArgs) ElementType() reflect.Type {
    95  	return reflect.TypeOf((*auditSinkPatchArgs)(nil)).Elem()
    96  }
    97  
    98  type AuditSinkPatchInput interface {
    99  	pulumi.Input
   100  
   101  	ToAuditSinkPatchOutput() AuditSinkPatchOutput
   102  	ToAuditSinkPatchOutputWithContext(ctx context.Context) AuditSinkPatchOutput
   103  }
   104  
   105  func (*AuditSinkPatch) ElementType() reflect.Type {
   106  	return reflect.TypeOf((**AuditSinkPatch)(nil)).Elem()
   107  }
   108  
   109  func (i *AuditSinkPatch) ToAuditSinkPatchOutput() AuditSinkPatchOutput {
   110  	return i.ToAuditSinkPatchOutputWithContext(context.Background())
   111  }
   112  
   113  func (i *AuditSinkPatch) ToAuditSinkPatchOutputWithContext(ctx context.Context) AuditSinkPatchOutput {
   114  	return pulumi.ToOutputWithContext(ctx, i).(AuditSinkPatchOutput)
   115  }
   116  
   117  // AuditSinkPatchArrayInput is an input type that accepts AuditSinkPatchArray and AuditSinkPatchArrayOutput values.
   118  // You can construct a concrete instance of `AuditSinkPatchArrayInput` via:
   119  //
   120  //	AuditSinkPatchArray{ AuditSinkPatchArgs{...} }
   121  type AuditSinkPatchArrayInput interface {
   122  	pulumi.Input
   123  
   124  	ToAuditSinkPatchArrayOutput() AuditSinkPatchArrayOutput
   125  	ToAuditSinkPatchArrayOutputWithContext(context.Context) AuditSinkPatchArrayOutput
   126  }
   127  
   128  type AuditSinkPatchArray []AuditSinkPatchInput
   129  
   130  func (AuditSinkPatchArray) ElementType() reflect.Type {
   131  	return reflect.TypeOf((*[]*AuditSinkPatch)(nil)).Elem()
   132  }
   133  
   134  func (i AuditSinkPatchArray) ToAuditSinkPatchArrayOutput() AuditSinkPatchArrayOutput {
   135  	return i.ToAuditSinkPatchArrayOutputWithContext(context.Background())
   136  }
   137  
   138  func (i AuditSinkPatchArray) ToAuditSinkPatchArrayOutputWithContext(ctx context.Context) AuditSinkPatchArrayOutput {
   139  	return pulumi.ToOutputWithContext(ctx, i).(AuditSinkPatchArrayOutput)
   140  }
   141  
   142  // AuditSinkPatchMapInput is an input type that accepts AuditSinkPatchMap and AuditSinkPatchMapOutput values.
   143  // You can construct a concrete instance of `AuditSinkPatchMapInput` via:
   144  //
   145  //	AuditSinkPatchMap{ "key": AuditSinkPatchArgs{...} }
   146  type AuditSinkPatchMapInput interface {
   147  	pulumi.Input
   148  
   149  	ToAuditSinkPatchMapOutput() AuditSinkPatchMapOutput
   150  	ToAuditSinkPatchMapOutputWithContext(context.Context) AuditSinkPatchMapOutput
   151  }
   152  
   153  type AuditSinkPatchMap map[string]AuditSinkPatchInput
   154  
   155  func (AuditSinkPatchMap) ElementType() reflect.Type {
   156  	return reflect.TypeOf((*map[string]*AuditSinkPatch)(nil)).Elem()
   157  }
   158  
   159  func (i AuditSinkPatchMap) ToAuditSinkPatchMapOutput() AuditSinkPatchMapOutput {
   160  	return i.ToAuditSinkPatchMapOutputWithContext(context.Background())
   161  }
   162  
   163  func (i AuditSinkPatchMap) ToAuditSinkPatchMapOutputWithContext(ctx context.Context) AuditSinkPatchMapOutput {
   164  	return pulumi.ToOutputWithContext(ctx, i).(AuditSinkPatchMapOutput)
   165  }
   166  
   167  type AuditSinkPatchOutput struct{ *pulumi.OutputState }
   168  
   169  func (AuditSinkPatchOutput) ElementType() reflect.Type {
   170  	return reflect.TypeOf((**AuditSinkPatch)(nil)).Elem()
   171  }
   172  
   173  func (o AuditSinkPatchOutput) ToAuditSinkPatchOutput() AuditSinkPatchOutput {
   174  	return o
   175  }
   176  
   177  func (o AuditSinkPatchOutput) ToAuditSinkPatchOutputWithContext(ctx context.Context) AuditSinkPatchOutput {
   178  	return o
   179  }
   180  
   181  // 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
   182  func (o AuditSinkPatchOutput) ApiVersion() pulumi.StringPtrOutput {
   183  	return o.ApplyT(func(v *AuditSinkPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
   184  }
   185  
   186  // 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
   187  func (o AuditSinkPatchOutput) Kind() pulumi.StringPtrOutput {
   188  	return o.ApplyT(func(v *AuditSinkPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   189  }
   190  
   191  func (o AuditSinkPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput {
   192  	return o.ApplyT(func(v *AuditSinkPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput)
   193  }
   194  
   195  // Spec defines the audit configuration spec
   196  func (o AuditSinkPatchOutput) Spec() AuditSinkSpecPatchPtrOutput {
   197  	return o.ApplyT(func(v *AuditSinkPatch) AuditSinkSpecPatchPtrOutput { return v.Spec }).(AuditSinkSpecPatchPtrOutput)
   198  }
   199  
   200  type AuditSinkPatchArrayOutput struct{ *pulumi.OutputState }
   201  
   202  func (AuditSinkPatchArrayOutput) ElementType() reflect.Type {
   203  	return reflect.TypeOf((*[]*AuditSinkPatch)(nil)).Elem()
   204  }
   205  
   206  func (o AuditSinkPatchArrayOutput) ToAuditSinkPatchArrayOutput() AuditSinkPatchArrayOutput {
   207  	return o
   208  }
   209  
   210  func (o AuditSinkPatchArrayOutput) ToAuditSinkPatchArrayOutputWithContext(ctx context.Context) AuditSinkPatchArrayOutput {
   211  	return o
   212  }
   213  
   214  func (o AuditSinkPatchArrayOutput) Index(i pulumi.IntInput) AuditSinkPatchOutput {
   215  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *AuditSinkPatch {
   216  		return vs[0].([]*AuditSinkPatch)[vs[1].(int)]
   217  	}).(AuditSinkPatchOutput)
   218  }
   219  
   220  type AuditSinkPatchMapOutput struct{ *pulumi.OutputState }
   221  
   222  func (AuditSinkPatchMapOutput) ElementType() reflect.Type {
   223  	return reflect.TypeOf((*map[string]*AuditSinkPatch)(nil)).Elem()
   224  }
   225  
   226  func (o AuditSinkPatchMapOutput) ToAuditSinkPatchMapOutput() AuditSinkPatchMapOutput {
   227  	return o
   228  }
   229  
   230  func (o AuditSinkPatchMapOutput) ToAuditSinkPatchMapOutputWithContext(ctx context.Context) AuditSinkPatchMapOutput {
   231  	return o
   232  }
   233  
   234  func (o AuditSinkPatchMapOutput) MapIndex(k pulumi.StringInput) AuditSinkPatchOutput {
   235  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *AuditSinkPatch {
   236  		return vs[0].(map[string]*AuditSinkPatch)[vs[1].(string)]
   237  	}).(AuditSinkPatchOutput)
   238  }
   239  
   240  func init() {
   241  	pulumi.RegisterInputType(reflect.TypeOf((*AuditSinkPatchInput)(nil)).Elem(), &AuditSinkPatch{})
   242  	pulumi.RegisterInputType(reflect.TypeOf((*AuditSinkPatchArrayInput)(nil)).Elem(), AuditSinkPatchArray{})
   243  	pulumi.RegisterInputType(reflect.TypeOf((*AuditSinkPatchMapInput)(nil)).Elem(), AuditSinkPatchMap{})
   244  	pulumi.RegisterOutputType(AuditSinkPatchOutput{})
   245  	pulumi.RegisterOutputType(AuditSinkPatchArrayOutput{})
   246  	pulumi.RegisterOutputType(AuditSinkPatchMapOutput{})
   247  }