pulumi-library/crds/kubernetes/hub/v1alpha1/apiaccess.go

166 lines
5.2 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"
)
// APIAccess defines who can access to a set of APIs.
type APIAccess struct {
pulumi.CustomResourceState
ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"`
Kind pulumi.StringPtrOutput `pulumi:"kind"`
Metadata v1.ObjectMetaPtrOutput `pulumi:"metadata"`
// The desired behavior of this APIAccess.
Spec APIAccessSpecPtrOutput `pulumi:"spec"`
// The current status of this APIAccess.
Status APIAccessStatusPtrOutput `pulumi:"status"`
}
// NewAPIAccess registers a new resource with the given unique name, arguments, and options.
func NewAPIAccess(ctx *pulumi.Context,
name string, args *APIAccessArgs, opts ...pulumi.ResourceOption) (*APIAccess, error) {
if args == nil {
args = &APIAccessArgs{}
}
args.ApiVersion = pulumi.StringPtr("hub.traefik.io/v1alpha1")
args.Kind = pulumi.StringPtr("APIAccess")
opts = internal.PkgResourceDefaultOpts(opts)
var resource APIAccess
err := ctx.RegisterResource("kubernetes:hub.traefik.io/v1alpha1:APIAccess", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAPIAccess gets an existing APIAccess 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 GetAPIAccess(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *APIAccessState, opts ...pulumi.ResourceOption) (*APIAccess, error) {
var resource APIAccess
err := ctx.ReadResource("kubernetes:hub.traefik.io/v1alpha1:APIAccess", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering APIAccess resources.
type apiaccessState struct {
}
type APIAccessState struct {
}
func (APIAccessState) ElementType() reflect.Type {
return reflect.TypeOf((*apiaccessState)(nil)).Elem()
}
type apiaccessArgs struct {
ApiVersion *string `pulumi:"apiVersion"`
Kind *string `pulumi:"kind"`
Metadata *v1.ObjectMeta `pulumi:"metadata"`
// The desired behavior of this APIAccess.
Spec *APIAccessSpec `pulumi:"spec"`
// The current status of this APIAccess.
Status *APIAccessStatus `pulumi:"status"`
}
// The set of arguments for constructing a APIAccess resource.
type APIAccessArgs struct {
ApiVersion pulumi.StringPtrInput
Kind pulumi.StringPtrInput
Metadata v1.ObjectMetaPtrInput
// The desired behavior of this APIAccess.
Spec APIAccessSpecPtrInput
// The current status of this APIAccess.
Status APIAccessStatusPtrInput
}
func (APIAccessArgs) ElementType() reflect.Type {
return reflect.TypeOf((*apiaccessArgs)(nil)).Elem()
}
type APIAccessInput interface {
pulumi.Input
ToAPIAccessOutput() APIAccessOutput
ToAPIAccessOutputWithContext(ctx context.Context) APIAccessOutput
}
func (*APIAccess) ElementType() reflect.Type {
return reflect.TypeOf((**APIAccess)(nil)).Elem()
}
func (i *APIAccess) ToAPIAccessOutput() APIAccessOutput {
return i.ToAPIAccessOutputWithContext(context.Background())
}
func (i *APIAccess) ToAPIAccessOutputWithContext(ctx context.Context) APIAccessOutput {
return pulumi.ToOutputWithContext(ctx, i).(APIAccessOutput)
}
func (i *APIAccess) ToOutput(ctx context.Context) pulumix.Output[*APIAccess] {
return pulumix.Output[*APIAccess]{
OutputState: i.ToAPIAccessOutputWithContext(ctx).OutputState,
}
}
type APIAccessOutput struct{ *pulumi.OutputState }
func (APIAccessOutput) ElementType() reflect.Type {
return reflect.TypeOf((**APIAccess)(nil)).Elem()
}
func (o APIAccessOutput) ToAPIAccessOutput() APIAccessOutput {
return o
}
func (o APIAccessOutput) ToAPIAccessOutputWithContext(ctx context.Context) APIAccessOutput {
return o
}
func (o APIAccessOutput) ToOutput(ctx context.Context) pulumix.Output[*APIAccess] {
return pulumix.Output[*APIAccess]{
OutputState: o.OutputState,
}
}
func (o APIAccessOutput) ApiVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *APIAccess) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
}
func (o APIAccessOutput) Kind() pulumi.StringPtrOutput {
return o.ApplyT(func(v *APIAccess) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
}
func (o APIAccessOutput) Metadata() v1.ObjectMetaPtrOutput {
return o.ApplyT(func(v *APIAccess) v1.ObjectMetaPtrOutput { return v.Metadata }).(v1.ObjectMetaPtrOutput)
}
// The desired behavior of this APIAccess.
func (o APIAccessOutput) Spec() APIAccessSpecPtrOutput {
return o.ApplyT(func(v *APIAccess) APIAccessSpecPtrOutput { return v.Spec }).(APIAccessSpecPtrOutput)
}
// The current status of this APIAccess.
func (o APIAccessOutput) Status() APIAccessStatusPtrOutput {
return o.ApplyT(func(v *APIAccess) APIAccessStatusPtrOutput { return v.Status }).(APIAccessStatusPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*APIAccessInput)(nil)).Elem(), &APIAccess{})
pulumi.RegisterOutputType(APIAccessOutput{})
}