github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/networking/v1beta1/ingressClass.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 v1beta1 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 // IngressClass represents the class of the Ingress, referenced by the Ingress Spec. The `ingressclass.kubernetes.io/is-default-class` annotation can be used to indicate that an IngressClass should be considered default. When a single IngressClass resource has this annotation set to true, new Ingress resources without a class specified will be assigned this default class. 15 type IngressClass 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 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 23 Metadata metav1.ObjectMetaPtrOutput `pulumi:"metadata"` 24 // Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 25 Spec IngressClassSpecPtrOutput `pulumi:"spec"` 26 } 27 28 // NewIngressClass registers a new resource with the given unique name, arguments, and options. 29 func NewIngressClass(ctx *pulumi.Context, 30 name string, args *IngressClassArgs, opts ...pulumi.ResourceOption) (*IngressClass, error) { 31 if args == nil { 32 args = &IngressClassArgs{} 33 } 34 35 args.ApiVersion = pulumi.StringPtr("networking.k8s.io/v1beta1") 36 args.Kind = pulumi.StringPtr("IngressClass") 37 aliases := pulumi.Aliases([]pulumi.Alias{ 38 { 39 Type: pulumi.String("kubernetes:networking.k8s.io/v1:IngressClass"), 40 }, 41 }) 42 opts = append(opts, aliases) 43 var resource IngressClass 44 err := ctx.RegisterResource("kubernetes:networking.k8s.io/v1beta1:IngressClass", name, args, &resource, opts...) 45 if err != nil { 46 return nil, err 47 } 48 return &resource, nil 49 } 50 51 // GetIngressClass gets an existing IngressClass resource's state with the given name, ID, and optional 52 // state properties that are used to uniquely qualify the lookup (nil if not required). 53 func GetIngressClass(ctx *pulumi.Context, 54 name string, id pulumi.IDInput, state *IngressClassState, opts ...pulumi.ResourceOption) (*IngressClass, error) { 55 var resource IngressClass 56 err := ctx.ReadResource("kubernetes:networking.k8s.io/v1beta1:IngressClass", name, id, state, &resource, opts...) 57 if err != nil { 58 return nil, err 59 } 60 return &resource, nil 61 } 62 63 // Input properties used for looking up and filtering IngressClass resources. 64 type ingressClassState struct { 65 } 66 67 type IngressClassState struct { 68 } 69 70 func (IngressClassState) ElementType() reflect.Type { 71 return reflect.TypeOf((*ingressClassState)(nil)).Elem() 72 } 73 74 type ingressClassArgs struct { 75 // 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 76 ApiVersion *string `pulumi:"apiVersion"` 77 // 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 78 Kind *string `pulumi:"kind"` 79 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 80 Metadata *metav1.ObjectMeta `pulumi:"metadata"` 81 // Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 82 Spec *IngressClassSpec `pulumi:"spec"` 83 } 84 85 // The set of arguments for constructing a IngressClass resource. 86 type IngressClassArgs struct { 87 // 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 88 ApiVersion pulumi.StringPtrInput 89 // 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 90 Kind pulumi.StringPtrInput 91 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 92 Metadata metav1.ObjectMetaPtrInput 93 // Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 94 Spec IngressClassSpecPtrInput 95 } 96 97 func (IngressClassArgs) ElementType() reflect.Type { 98 return reflect.TypeOf((*ingressClassArgs)(nil)).Elem() 99 } 100 101 type IngressClassInput interface { 102 pulumi.Input 103 104 ToIngressClassOutput() IngressClassOutput 105 ToIngressClassOutputWithContext(ctx context.Context) IngressClassOutput 106 } 107 108 func (*IngressClass) ElementType() reflect.Type { 109 return reflect.TypeOf((**IngressClass)(nil)).Elem() 110 } 111 112 func (i *IngressClass) ToIngressClassOutput() IngressClassOutput { 113 return i.ToIngressClassOutputWithContext(context.Background()) 114 } 115 116 func (i *IngressClass) ToIngressClassOutputWithContext(ctx context.Context) IngressClassOutput { 117 return pulumi.ToOutputWithContext(ctx, i).(IngressClassOutput) 118 } 119 120 // IngressClassArrayInput is an input type that accepts IngressClassArray and IngressClassArrayOutput values. 121 // You can construct a concrete instance of `IngressClassArrayInput` via: 122 // 123 // IngressClassArray{ IngressClassArgs{...} } 124 type IngressClassArrayInput interface { 125 pulumi.Input 126 127 ToIngressClassArrayOutput() IngressClassArrayOutput 128 ToIngressClassArrayOutputWithContext(context.Context) IngressClassArrayOutput 129 } 130 131 type IngressClassArray []IngressClassInput 132 133 func (IngressClassArray) ElementType() reflect.Type { 134 return reflect.TypeOf((*[]*IngressClass)(nil)).Elem() 135 } 136 137 func (i IngressClassArray) ToIngressClassArrayOutput() IngressClassArrayOutput { 138 return i.ToIngressClassArrayOutputWithContext(context.Background()) 139 } 140 141 func (i IngressClassArray) ToIngressClassArrayOutputWithContext(ctx context.Context) IngressClassArrayOutput { 142 return pulumi.ToOutputWithContext(ctx, i).(IngressClassArrayOutput) 143 } 144 145 // IngressClassMapInput is an input type that accepts IngressClassMap and IngressClassMapOutput values. 146 // You can construct a concrete instance of `IngressClassMapInput` via: 147 // 148 // IngressClassMap{ "key": IngressClassArgs{...} } 149 type IngressClassMapInput interface { 150 pulumi.Input 151 152 ToIngressClassMapOutput() IngressClassMapOutput 153 ToIngressClassMapOutputWithContext(context.Context) IngressClassMapOutput 154 } 155 156 type IngressClassMap map[string]IngressClassInput 157 158 func (IngressClassMap) ElementType() reflect.Type { 159 return reflect.TypeOf((*map[string]*IngressClass)(nil)).Elem() 160 } 161 162 func (i IngressClassMap) ToIngressClassMapOutput() IngressClassMapOutput { 163 return i.ToIngressClassMapOutputWithContext(context.Background()) 164 } 165 166 func (i IngressClassMap) ToIngressClassMapOutputWithContext(ctx context.Context) IngressClassMapOutput { 167 return pulumi.ToOutputWithContext(ctx, i).(IngressClassMapOutput) 168 } 169 170 type IngressClassOutput struct{ *pulumi.OutputState } 171 172 func (IngressClassOutput) ElementType() reflect.Type { 173 return reflect.TypeOf((**IngressClass)(nil)).Elem() 174 } 175 176 func (o IngressClassOutput) ToIngressClassOutput() IngressClassOutput { 177 return o 178 } 179 180 func (o IngressClassOutput) ToIngressClassOutputWithContext(ctx context.Context) IngressClassOutput { 181 return o 182 } 183 184 // 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 185 func (o IngressClassOutput) ApiVersion() pulumi.StringPtrOutput { 186 return o.ApplyT(func(v *IngressClass) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 187 } 188 189 // 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 190 func (o IngressClassOutput) Kind() pulumi.StringPtrOutput { 191 return o.ApplyT(func(v *IngressClass) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 192 } 193 194 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 195 func (o IngressClassOutput) Metadata() metav1.ObjectMetaPtrOutput { 196 return o.ApplyT(func(v *IngressClass) metav1.ObjectMetaPtrOutput { return v.Metadata }).(metav1.ObjectMetaPtrOutput) 197 } 198 199 // Spec is the desired state of the IngressClass. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 200 func (o IngressClassOutput) Spec() IngressClassSpecPtrOutput { 201 return o.ApplyT(func(v *IngressClass) IngressClassSpecPtrOutput { return v.Spec }).(IngressClassSpecPtrOutput) 202 } 203 204 type IngressClassArrayOutput struct{ *pulumi.OutputState } 205 206 func (IngressClassArrayOutput) ElementType() reflect.Type { 207 return reflect.TypeOf((*[]*IngressClass)(nil)).Elem() 208 } 209 210 func (o IngressClassArrayOutput) ToIngressClassArrayOutput() IngressClassArrayOutput { 211 return o 212 } 213 214 func (o IngressClassArrayOutput) ToIngressClassArrayOutputWithContext(ctx context.Context) IngressClassArrayOutput { 215 return o 216 } 217 218 func (o IngressClassArrayOutput) Index(i pulumi.IntInput) IngressClassOutput { 219 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *IngressClass { 220 return vs[0].([]*IngressClass)[vs[1].(int)] 221 }).(IngressClassOutput) 222 } 223 224 type IngressClassMapOutput struct{ *pulumi.OutputState } 225 226 func (IngressClassMapOutput) ElementType() reflect.Type { 227 return reflect.TypeOf((*map[string]*IngressClass)(nil)).Elem() 228 } 229 230 func (o IngressClassMapOutput) ToIngressClassMapOutput() IngressClassMapOutput { 231 return o 232 } 233 234 func (o IngressClassMapOutput) ToIngressClassMapOutputWithContext(ctx context.Context) IngressClassMapOutput { 235 return o 236 } 237 238 func (o IngressClassMapOutput) MapIndex(k pulumi.StringInput) IngressClassOutput { 239 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *IngressClass { 240 return vs[0].(map[string]*IngressClass)[vs[1].(string)] 241 }).(IngressClassOutput) 242 } 243 244 func init() { 245 pulumi.RegisterInputType(reflect.TypeOf((*IngressClassInput)(nil)).Elem(), &IngressClass{}) 246 pulumi.RegisterInputType(reflect.TypeOf((*IngressClassArrayInput)(nil)).Elem(), IngressClassArray{}) 247 pulumi.RegisterInputType(reflect.TypeOf((*IngressClassMapInput)(nil)).Elem(), IngressClassMap{}) 248 pulumi.RegisterOutputType(IngressClassOutput{}) 249 pulumi.RegisterOutputType(IngressClassArrayOutput{}) 250 pulumi.RegisterOutputType(IngressClassMapOutput{}) 251 }