github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/flowcontrol/v1beta3/flowSchemaPatch.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 v1beta3
     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  // FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher".
    21  type FlowSchemaPatch 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` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    29  	Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"`
    30  	// `spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    31  	Spec FlowSchemaSpecPatchPtrOutput `pulumi:"spec"`
    32  	// `status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    33  	Status FlowSchemaStatusPatchPtrOutput `pulumi:"status"`
    34  }
    35  
    36  // NewFlowSchemaPatch registers a new resource with the given unique name, arguments, and options.
    37  func NewFlowSchemaPatch(ctx *pulumi.Context,
    38  	name string, args *FlowSchemaPatchArgs, opts ...pulumi.ResourceOption) (*FlowSchemaPatch, error) {
    39  	if args == nil {
    40  		args = &FlowSchemaPatchArgs{}
    41  	}
    42  
    43  	args.ApiVersion = pulumi.StringPtr("flowcontrol.apiserver.k8s.io/v1beta3")
    44  	args.Kind = pulumi.StringPtr("FlowSchema")
    45  	aliases := pulumi.Aliases([]pulumi.Alias{
    46  		{
    47  			Type: pulumi.String("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:FlowSchemaPatch"),
    48  		},
    49  		{
    50  			Type: pulumi.String("kubernetes:flowcontrol.apiserver.k8s.io/v1beta1:FlowSchemaPatch"),
    51  		},
    52  		{
    53  			Type: pulumi.String("kubernetes:flowcontrol.apiserver.k8s.io/v1beta2:FlowSchemaPatch"),
    54  		},
    55  	})
    56  	opts = append(opts, aliases)
    57  	var resource FlowSchemaPatch
    58  	err := ctx.RegisterResource("kubernetes:flowcontrol.apiserver.k8s.io/v1beta3:FlowSchemaPatch", name, args, &resource, opts...)
    59  	if err != nil {
    60  		return nil, err
    61  	}
    62  	return &resource, nil
    63  }
    64  
    65  // GetFlowSchemaPatch gets an existing FlowSchemaPatch resource's state with the given name, ID, and optional
    66  // state properties that are used to uniquely qualify the lookup (nil if not required).
    67  func GetFlowSchemaPatch(ctx *pulumi.Context,
    68  	name string, id pulumi.IDInput, state *FlowSchemaPatchState, opts ...pulumi.ResourceOption) (*FlowSchemaPatch, error) {
    69  	var resource FlowSchemaPatch
    70  	err := ctx.ReadResource("kubernetes:flowcontrol.apiserver.k8s.io/v1beta3:FlowSchemaPatch", name, id, state, &resource, opts...)
    71  	if err != nil {
    72  		return nil, err
    73  	}
    74  	return &resource, nil
    75  }
    76  
    77  // Input properties used for looking up and filtering FlowSchemaPatch resources.
    78  type flowSchemaPatchState struct {
    79  }
    80  
    81  type FlowSchemaPatchState struct {
    82  }
    83  
    84  func (FlowSchemaPatchState) ElementType() reflect.Type {
    85  	return reflect.TypeOf((*flowSchemaPatchState)(nil)).Elem()
    86  }
    87  
    88  type flowSchemaPatchArgs struct {
    89  	// 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
    90  	ApiVersion *string `pulumi:"apiVersion"`
    91  	// 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
    92  	Kind *string `pulumi:"kind"`
    93  	// `metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    94  	Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"`
    95  	// `spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    96  	Spec *FlowSchemaSpecPatch `pulumi:"spec"`
    97  }
    98  
    99  // The set of arguments for constructing a FlowSchemaPatch resource.
   100  type FlowSchemaPatchArgs struct {
   101  	// 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
   102  	ApiVersion pulumi.StringPtrInput
   103  	// 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
   104  	Kind pulumi.StringPtrInput
   105  	// `metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
   106  	Metadata metav1.ObjectMetaPatchPtrInput
   107  	// `spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
   108  	Spec FlowSchemaSpecPatchPtrInput
   109  }
   110  
   111  func (FlowSchemaPatchArgs) ElementType() reflect.Type {
   112  	return reflect.TypeOf((*flowSchemaPatchArgs)(nil)).Elem()
   113  }
   114  
   115  type FlowSchemaPatchInput interface {
   116  	pulumi.Input
   117  
   118  	ToFlowSchemaPatchOutput() FlowSchemaPatchOutput
   119  	ToFlowSchemaPatchOutputWithContext(ctx context.Context) FlowSchemaPatchOutput
   120  }
   121  
   122  func (*FlowSchemaPatch) ElementType() reflect.Type {
   123  	return reflect.TypeOf((**FlowSchemaPatch)(nil)).Elem()
   124  }
   125  
   126  func (i *FlowSchemaPatch) ToFlowSchemaPatchOutput() FlowSchemaPatchOutput {
   127  	return i.ToFlowSchemaPatchOutputWithContext(context.Background())
   128  }
   129  
   130  func (i *FlowSchemaPatch) ToFlowSchemaPatchOutputWithContext(ctx context.Context) FlowSchemaPatchOutput {
   131  	return pulumi.ToOutputWithContext(ctx, i).(FlowSchemaPatchOutput)
   132  }
   133  
   134  // FlowSchemaPatchArrayInput is an input type that accepts FlowSchemaPatchArray and FlowSchemaPatchArrayOutput values.
   135  // You can construct a concrete instance of `FlowSchemaPatchArrayInput` via:
   136  //
   137  //	FlowSchemaPatchArray{ FlowSchemaPatchArgs{...} }
   138  type FlowSchemaPatchArrayInput interface {
   139  	pulumi.Input
   140  
   141  	ToFlowSchemaPatchArrayOutput() FlowSchemaPatchArrayOutput
   142  	ToFlowSchemaPatchArrayOutputWithContext(context.Context) FlowSchemaPatchArrayOutput
   143  }
   144  
   145  type FlowSchemaPatchArray []FlowSchemaPatchInput
   146  
   147  func (FlowSchemaPatchArray) ElementType() reflect.Type {
   148  	return reflect.TypeOf((*[]*FlowSchemaPatch)(nil)).Elem()
   149  }
   150  
   151  func (i FlowSchemaPatchArray) ToFlowSchemaPatchArrayOutput() FlowSchemaPatchArrayOutput {
   152  	return i.ToFlowSchemaPatchArrayOutputWithContext(context.Background())
   153  }
   154  
   155  func (i FlowSchemaPatchArray) ToFlowSchemaPatchArrayOutputWithContext(ctx context.Context) FlowSchemaPatchArrayOutput {
   156  	return pulumi.ToOutputWithContext(ctx, i).(FlowSchemaPatchArrayOutput)
   157  }
   158  
   159  // FlowSchemaPatchMapInput is an input type that accepts FlowSchemaPatchMap and FlowSchemaPatchMapOutput values.
   160  // You can construct a concrete instance of `FlowSchemaPatchMapInput` via:
   161  //
   162  //	FlowSchemaPatchMap{ "key": FlowSchemaPatchArgs{...} }
   163  type FlowSchemaPatchMapInput interface {
   164  	pulumi.Input
   165  
   166  	ToFlowSchemaPatchMapOutput() FlowSchemaPatchMapOutput
   167  	ToFlowSchemaPatchMapOutputWithContext(context.Context) FlowSchemaPatchMapOutput
   168  }
   169  
   170  type FlowSchemaPatchMap map[string]FlowSchemaPatchInput
   171  
   172  func (FlowSchemaPatchMap) ElementType() reflect.Type {
   173  	return reflect.TypeOf((*map[string]*FlowSchemaPatch)(nil)).Elem()
   174  }
   175  
   176  func (i FlowSchemaPatchMap) ToFlowSchemaPatchMapOutput() FlowSchemaPatchMapOutput {
   177  	return i.ToFlowSchemaPatchMapOutputWithContext(context.Background())
   178  }
   179  
   180  func (i FlowSchemaPatchMap) ToFlowSchemaPatchMapOutputWithContext(ctx context.Context) FlowSchemaPatchMapOutput {
   181  	return pulumi.ToOutputWithContext(ctx, i).(FlowSchemaPatchMapOutput)
   182  }
   183  
   184  type FlowSchemaPatchOutput struct{ *pulumi.OutputState }
   185  
   186  func (FlowSchemaPatchOutput) ElementType() reflect.Type {
   187  	return reflect.TypeOf((**FlowSchemaPatch)(nil)).Elem()
   188  }
   189  
   190  func (o FlowSchemaPatchOutput) ToFlowSchemaPatchOutput() FlowSchemaPatchOutput {
   191  	return o
   192  }
   193  
   194  func (o FlowSchemaPatchOutput) ToFlowSchemaPatchOutputWithContext(ctx context.Context) FlowSchemaPatchOutput {
   195  	return o
   196  }
   197  
   198  // 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
   199  func (o FlowSchemaPatchOutput) ApiVersion() pulumi.StringPtrOutput {
   200  	return o.ApplyT(func(v *FlowSchemaPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
   201  }
   202  
   203  // 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
   204  func (o FlowSchemaPatchOutput) Kind() pulumi.StringPtrOutput {
   205  	return o.ApplyT(func(v *FlowSchemaPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   206  }
   207  
   208  // `metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
   209  func (o FlowSchemaPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput {
   210  	return o.ApplyT(func(v *FlowSchemaPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput)
   211  }
   212  
   213  // `spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
   214  func (o FlowSchemaPatchOutput) Spec() FlowSchemaSpecPatchPtrOutput {
   215  	return o.ApplyT(func(v *FlowSchemaPatch) FlowSchemaSpecPatchPtrOutput { return v.Spec }).(FlowSchemaSpecPatchPtrOutput)
   216  }
   217  
   218  // `status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
   219  func (o FlowSchemaPatchOutput) Status() FlowSchemaStatusPatchPtrOutput {
   220  	return o.ApplyT(func(v *FlowSchemaPatch) FlowSchemaStatusPatchPtrOutput { return v.Status }).(FlowSchemaStatusPatchPtrOutput)
   221  }
   222  
   223  type FlowSchemaPatchArrayOutput struct{ *pulumi.OutputState }
   224  
   225  func (FlowSchemaPatchArrayOutput) ElementType() reflect.Type {
   226  	return reflect.TypeOf((*[]*FlowSchemaPatch)(nil)).Elem()
   227  }
   228  
   229  func (o FlowSchemaPatchArrayOutput) ToFlowSchemaPatchArrayOutput() FlowSchemaPatchArrayOutput {
   230  	return o
   231  }
   232  
   233  func (o FlowSchemaPatchArrayOutput) ToFlowSchemaPatchArrayOutputWithContext(ctx context.Context) FlowSchemaPatchArrayOutput {
   234  	return o
   235  }
   236  
   237  func (o FlowSchemaPatchArrayOutput) Index(i pulumi.IntInput) FlowSchemaPatchOutput {
   238  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FlowSchemaPatch {
   239  		return vs[0].([]*FlowSchemaPatch)[vs[1].(int)]
   240  	}).(FlowSchemaPatchOutput)
   241  }
   242  
   243  type FlowSchemaPatchMapOutput struct{ *pulumi.OutputState }
   244  
   245  func (FlowSchemaPatchMapOutput) ElementType() reflect.Type {
   246  	return reflect.TypeOf((*map[string]*FlowSchemaPatch)(nil)).Elem()
   247  }
   248  
   249  func (o FlowSchemaPatchMapOutput) ToFlowSchemaPatchMapOutput() FlowSchemaPatchMapOutput {
   250  	return o
   251  }
   252  
   253  func (o FlowSchemaPatchMapOutput) ToFlowSchemaPatchMapOutputWithContext(ctx context.Context) FlowSchemaPatchMapOutput {
   254  	return o
   255  }
   256  
   257  func (o FlowSchemaPatchMapOutput) MapIndex(k pulumi.StringInput) FlowSchemaPatchOutput {
   258  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FlowSchemaPatch {
   259  		return vs[0].(map[string]*FlowSchemaPatch)[vs[1].(string)]
   260  	}).(FlowSchemaPatchOutput)
   261  }
   262  
   263  func init() {
   264  	pulumi.RegisterInputType(reflect.TypeOf((*FlowSchemaPatchInput)(nil)).Elem(), &FlowSchemaPatch{})
   265  	pulumi.RegisterInputType(reflect.TypeOf((*FlowSchemaPatchArrayInput)(nil)).Elem(), FlowSchemaPatchArray{})
   266  	pulumi.RegisterInputType(reflect.TypeOf((*FlowSchemaPatchMapInput)(nil)).Elem(), FlowSchemaPatchMap{})
   267  	pulumi.RegisterOutputType(FlowSchemaPatchOutput{})
   268  	pulumi.RegisterOutputType(FlowSchemaPatchArrayOutput{})
   269  	pulumi.RegisterOutputType(FlowSchemaPatchMapOutput{})
   270  }