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