166 lines
5.5 KiB
Go
166 lines
5.5 KiB
Go
// Code generated by crd2pulumi DO NOT EDIT.
|
|
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
|
|
|
package v1alpha1
|
|
|
|
import (
|
|
"context"
|
|
"reflect"
|
|
|
|
"antoine-roux.tk/projects/go/pulumi-library/crds/kubernetes/internal"
|
|
v1 "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/meta/v1"
|
|
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
|
"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
|
|
)
|
|
|
|
// APIRateLimit defines how group of consumers are rate limited on a set of APIs.
|
|
type APIRateLimit struct {
|
|
pulumi.CustomResourceState
|
|
|
|
ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"`
|
|
Kind pulumi.StringPtrOutput `pulumi:"kind"`
|
|
Metadata v1.ObjectMetaPtrOutput `pulumi:"metadata"`
|
|
// The desired behavior of this APIRateLimit.
|
|
Spec APIRateLimitSpecPtrOutput `pulumi:"spec"`
|
|
// The current status of this APIRateLimit.
|
|
Status APIRateLimitStatusPtrOutput `pulumi:"status"`
|
|
}
|
|
|
|
// NewAPIRateLimit registers a new resource with the given unique name, arguments, and options.
|
|
func NewAPIRateLimit(ctx *pulumi.Context,
|
|
name string, args *APIRateLimitArgs, opts ...pulumi.ResourceOption) (*APIRateLimit, error) {
|
|
if args == nil {
|
|
args = &APIRateLimitArgs{}
|
|
}
|
|
|
|
args.ApiVersion = pulumi.StringPtr("hub.traefik.io/v1alpha1")
|
|
args.Kind = pulumi.StringPtr("APIRateLimit")
|
|
opts = internal.PkgResourceDefaultOpts(opts)
|
|
var resource APIRateLimit
|
|
err := ctx.RegisterResource("kubernetes:hub.traefik.io/v1alpha1:APIRateLimit", name, args, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// GetAPIRateLimit gets an existing APIRateLimit resource's state with the given name, ID, and optional
|
|
// state properties that are used to uniquely qualify the lookup (nil if not required).
|
|
func GetAPIRateLimit(ctx *pulumi.Context,
|
|
name string, id pulumi.IDInput, state *APIRateLimitState, opts ...pulumi.ResourceOption) (*APIRateLimit, error) {
|
|
var resource APIRateLimit
|
|
err := ctx.ReadResource("kubernetes:hub.traefik.io/v1alpha1:APIRateLimit", name, id, state, &resource, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return &resource, nil
|
|
}
|
|
|
|
// Input properties used for looking up and filtering APIRateLimit resources.
|
|
type apirateLimitState struct {
|
|
}
|
|
|
|
type APIRateLimitState struct {
|
|
}
|
|
|
|
func (APIRateLimitState) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*apirateLimitState)(nil)).Elem()
|
|
}
|
|
|
|
type apirateLimitArgs struct {
|
|
ApiVersion *string `pulumi:"apiVersion"`
|
|
Kind *string `pulumi:"kind"`
|
|
Metadata *v1.ObjectMeta `pulumi:"metadata"`
|
|
// The desired behavior of this APIRateLimit.
|
|
Spec *APIRateLimitSpec `pulumi:"spec"`
|
|
// The current status of this APIRateLimit.
|
|
Status *APIRateLimitStatus `pulumi:"status"`
|
|
}
|
|
|
|
// The set of arguments for constructing a APIRateLimit resource.
|
|
type APIRateLimitArgs struct {
|
|
ApiVersion pulumi.StringPtrInput
|
|
Kind pulumi.StringPtrInput
|
|
Metadata v1.ObjectMetaPtrInput
|
|
// The desired behavior of this APIRateLimit.
|
|
Spec APIRateLimitSpecPtrInput
|
|
// The current status of this APIRateLimit.
|
|
Status APIRateLimitStatusPtrInput
|
|
}
|
|
|
|
func (APIRateLimitArgs) ElementType() reflect.Type {
|
|
return reflect.TypeOf((*apirateLimitArgs)(nil)).Elem()
|
|
}
|
|
|
|
type APIRateLimitInput interface {
|
|
pulumi.Input
|
|
|
|
ToAPIRateLimitOutput() APIRateLimitOutput
|
|
ToAPIRateLimitOutputWithContext(ctx context.Context) APIRateLimitOutput
|
|
}
|
|
|
|
func (*APIRateLimit) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**APIRateLimit)(nil)).Elem()
|
|
}
|
|
|
|
func (i *APIRateLimit) ToAPIRateLimitOutput() APIRateLimitOutput {
|
|
return i.ToAPIRateLimitOutputWithContext(context.Background())
|
|
}
|
|
|
|
func (i *APIRateLimit) ToAPIRateLimitOutputWithContext(ctx context.Context) APIRateLimitOutput {
|
|
return pulumi.ToOutputWithContext(ctx, i).(APIRateLimitOutput)
|
|
}
|
|
|
|
func (i *APIRateLimit) ToOutput(ctx context.Context) pulumix.Output[*APIRateLimit] {
|
|
return pulumix.Output[*APIRateLimit]{
|
|
OutputState: i.ToAPIRateLimitOutputWithContext(ctx).OutputState,
|
|
}
|
|
}
|
|
|
|
type APIRateLimitOutput struct{ *pulumi.OutputState }
|
|
|
|
func (APIRateLimitOutput) ElementType() reflect.Type {
|
|
return reflect.TypeOf((**APIRateLimit)(nil)).Elem()
|
|
}
|
|
|
|
func (o APIRateLimitOutput) ToAPIRateLimitOutput() APIRateLimitOutput {
|
|
return o
|
|
}
|
|
|
|
func (o APIRateLimitOutput) ToAPIRateLimitOutputWithContext(ctx context.Context) APIRateLimitOutput {
|
|
return o
|
|
}
|
|
|
|
func (o APIRateLimitOutput) ToOutput(ctx context.Context) pulumix.Output[*APIRateLimit] {
|
|
return pulumix.Output[*APIRateLimit]{
|
|
OutputState: o.OutputState,
|
|
}
|
|
}
|
|
|
|
func (o APIRateLimitOutput) ApiVersion() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *APIRateLimit) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
func (o APIRateLimitOutput) Kind() pulumi.StringPtrOutput {
|
|
return o.ApplyT(func(v *APIRateLimit) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
|
|
}
|
|
|
|
func (o APIRateLimitOutput) Metadata() v1.ObjectMetaPtrOutput {
|
|
return o.ApplyT(func(v *APIRateLimit) v1.ObjectMetaPtrOutput { return v.Metadata }).(v1.ObjectMetaPtrOutput)
|
|
}
|
|
|
|
// The desired behavior of this APIRateLimit.
|
|
func (o APIRateLimitOutput) Spec() APIRateLimitSpecPtrOutput {
|
|
return o.ApplyT(func(v *APIRateLimit) APIRateLimitSpecPtrOutput { return v.Spec }).(APIRateLimitSpecPtrOutput)
|
|
}
|
|
|
|
// The current status of this APIRateLimit.
|
|
func (o APIRateLimitOutput) Status() APIRateLimitStatusPtrOutput {
|
|
return o.ApplyT(func(v *APIRateLimit) APIRateLimitStatusPtrOutput { return v.Status }).(APIRateLimitStatusPtrOutput)
|
|
}
|
|
|
|
func init() {
|
|
pulumi.RegisterInputType(reflect.TypeOf((*APIRateLimitInput)(nil)).Elem(), &APIRateLimit{})
|
|
pulumi.RegisterOutputType(APIRateLimitOutput{})
|
|
}
|