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

169 lines
6.4 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"
)
// AccessControlPolicy defines an access control policy.
type AccessControlPolicy struct {
pulumi.CustomResourceState
ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"`
Kind pulumi.StringPtrOutput `pulumi:"kind"`
Metadata v1.ObjectMetaPtrOutput `pulumi:"metadata"`
// AccessControlPolicySpec configures an access control policy.
Spec AccessControlPolicySpecPtrOutput `pulumi:"spec"`
// The current status of this access control policy.
Status AccessControlPolicyStatusPtrOutput `pulumi:"status"`
}
// NewAccessControlPolicy registers a new resource with the given unique name, arguments, and options.
func NewAccessControlPolicy(ctx *pulumi.Context,
name string, args *AccessControlPolicyArgs, opts ...pulumi.ResourceOption) (*AccessControlPolicy, error) {
if args == nil {
args = &AccessControlPolicyArgs{}
}
args.ApiVersion = pulumi.StringPtr("hub.traefik.io/v1alpha1")
args.Kind = pulumi.StringPtr("AccessControlPolicy")
if args.Spec != nil {
args.Spec = args.Spec.ToAccessControlPolicySpecPtrOutput().ApplyT(func(v *AccessControlPolicySpec) *AccessControlPolicySpec { return v.Defaults() }).(AccessControlPolicySpecPtrOutput)
}
opts = internal.PkgResourceDefaultOpts(opts)
var resource AccessControlPolicy
err := ctx.RegisterResource("kubernetes:hub.traefik.io/v1alpha1:AccessControlPolicy", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetAccessControlPolicy gets an existing AccessControlPolicy 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 GetAccessControlPolicy(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *AccessControlPolicyState, opts ...pulumi.ResourceOption) (*AccessControlPolicy, error) {
var resource AccessControlPolicy
err := ctx.ReadResource("kubernetes:hub.traefik.io/v1alpha1:AccessControlPolicy", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering AccessControlPolicy resources.
type accessControlPolicyState struct {
}
type AccessControlPolicyState struct {
}
func (AccessControlPolicyState) ElementType() reflect.Type {
return reflect.TypeOf((*accessControlPolicyState)(nil)).Elem()
}
type accessControlPolicyArgs struct {
ApiVersion *string `pulumi:"apiVersion"`
Kind *string `pulumi:"kind"`
Metadata *v1.ObjectMeta `pulumi:"metadata"`
// AccessControlPolicySpec configures an access control policy.
Spec *AccessControlPolicySpec `pulumi:"spec"`
// The current status of this access control policy.
Status *AccessControlPolicyStatus `pulumi:"status"`
}
// The set of arguments for constructing a AccessControlPolicy resource.
type AccessControlPolicyArgs struct {
ApiVersion pulumi.StringPtrInput
Kind pulumi.StringPtrInput
Metadata v1.ObjectMetaPtrInput
// AccessControlPolicySpec configures an access control policy.
Spec AccessControlPolicySpecPtrInput
// The current status of this access control policy.
Status AccessControlPolicyStatusPtrInput
}
func (AccessControlPolicyArgs) ElementType() reflect.Type {
return reflect.TypeOf((*accessControlPolicyArgs)(nil)).Elem()
}
type AccessControlPolicyInput interface {
pulumi.Input
ToAccessControlPolicyOutput() AccessControlPolicyOutput
ToAccessControlPolicyOutputWithContext(ctx context.Context) AccessControlPolicyOutput
}
func (*AccessControlPolicy) ElementType() reflect.Type {
return reflect.TypeOf((**AccessControlPolicy)(nil)).Elem()
}
func (i *AccessControlPolicy) ToAccessControlPolicyOutput() AccessControlPolicyOutput {
return i.ToAccessControlPolicyOutputWithContext(context.Background())
}
func (i *AccessControlPolicy) ToAccessControlPolicyOutputWithContext(ctx context.Context) AccessControlPolicyOutput {
return pulumi.ToOutputWithContext(ctx, i).(AccessControlPolicyOutput)
}
func (i *AccessControlPolicy) ToOutput(ctx context.Context) pulumix.Output[*AccessControlPolicy] {
return pulumix.Output[*AccessControlPolicy]{
OutputState: i.ToAccessControlPolicyOutputWithContext(ctx).OutputState,
}
}
type AccessControlPolicyOutput struct{ *pulumi.OutputState }
func (AccessControlPolicyOutput) ElementType() reflect.Type {
return reflect.TypeOf((**AccessControlPolicy)(nil)).Elem()
}
func (o AccessControlPolicyOutput) ToAccessControlPolicyOutput() AccessControlPolicyOutput {
return o
}
func (o AccessControlPolicyOutput) ToAccessControlPolicyOutputWithContext(ctx context.Context) AccessControlPolicyOutput {
return o
}
func (o AccessControlPolicyOutput) ToOutput(ctx context.Context) pulumix.Output[*AccessControlPolicy] {
return pulumix.Output[*AccessControlPolicy]{
OutputState: o.OutputState,
}
}
func (o AccessControlPolicyOutput) ApiVersion() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccessControlPolicy) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
}
func (o AccessControlPolicyOutput) Kind() pulumi.StringPtrOutput {
return o.ApplyT(func(v *AccessControlPolicy) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
}
func (o AccessControlPolicyOutput) Metadata() v1.ObjectMetaPtrOutput {
return o.ApplyT(func(v *AccessControlPolicy) v1.ObjectMetaPtrOutput { return v.Metadata }).(v1.ObjectMetaPtrOutput)
}
// AccessControlPolicySpec configures an access control policy.
func (o AccessControlPolicyOutput) Spec() AccessControlPolicySpecPtrOutput {
return o.ApplyT(func(v *AccessControlPolicy) AccessControlPolicySpecPtrOutput { return v.Spec }).(AccessControlPolicySpecPtrOutput)
}
// The current status of this access control policy.
func (o AccessControlPolicyOutput) Status() AccessControlPolicyStatusPtrOutput {
return o.ApplyT(func(v *AccessControlPolicy) AccessControlPolicyStatusPtrOutput { return v.Status }).(AccessControlPolicyStatusPtrOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*AccessControlPolicyInput)(nil)).Elem(), &AccessControlPolicy{})
pulumi.RegisterOutputType(AccessControlPolicyOutput{})
}