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