github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/admissionregistration/v1beta1/mutatingWebhookConfigurationPatch.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 // 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 // MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. Deprecated in v1.16, planned for removal in v1.19. Use admissionregistration.k8s.io/v1 MutatingWebhookConfiguration instead. 21 type MutatingWebhookConfigurationPatch 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 metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. 29 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 30 // Webhooks is a list of webhooks and the affected resources and operations. 31 Webhooks MutatingWebhookPatchArrayOutput `pulumi:"webhooks"` 32 } 33 34 // NewMutatingWebhookConfigurationPatch registers a new resource with the given unique name, arguments, and options. 35 func NewMutatingWebhookConfigurationPatch(ctx *pulumi.Context, 36 name string, args *MutatingWebhookConfigurationPatchArgs, opts ...pulumi.ResourceOption) (*MutatingWebhookConfigurationPatch, error) { 37 if args == nil { 38 args = &MutatingWebhookConfigurationPatchArgs{} 39 } 40 41 args.ApiVersion = pulumi.StringPtr("admissionregistration.k8s.io/v1beta1") 42 args.Kind = pulumi.StringPtr("MutatingWebhookConfiguration") 43 aliases := pulumi.Aliases([]pulumi.Alias{ 44 { 45 Type: pulumi.String("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfigurationPatch"), 46 }, 47 }) 48 opts = append(opts, aliases) 49 var resource MutatingWebhookConfigurationPatch 50 err := ctx.RegisterResource("kubernetes:admissionregistration.k8s.io/v1beta1:MutatingWebhookConfigurationPatch", name, args, &resource, opts...) 51 if err != nil { 52 return nil, err 53 } 54 return &resource, nil 55 } 56 57 // GetMutatingWebhookConfigurationPatch gets an existing MutatingWebhookConfigurationPatch 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 GetMutatingWebhookConfigurationPatch(ctx *pulumi.Context, 60 name string, id pulumi.IDInput, state *MutatingWebhookConfigurationPatchState, opts ...pulumi.ResourceOption) (*MutatingWebhookConfigurationPatch, error) { 61 var resource MutatingWebhookConfigurationPatch 62 err := ctx.ReadResource("kubernetes:admissionregistration.k8s.io/v1beta1:MutatingWebhookConfigurationPatch", 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 MutatingWebhookConfigurationPatch resources. 70 type mutatingWebhookConfigurationPatchState struct { 71 } 72 73 type MutatingWebhookConfigurationPatchState struct { 74 } 75 76 func (MutatingWebhookConfigurationPatchState) ElementType() reflect.Type { 77 return reflect.TypeOf((*mutatingWebhookConfigurationPatchState)(nil)).Elem() 78 } 79 80 type mutatingWebhookConfigurationPatchArgs 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 metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. 86 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 87 // Webhooks is a list of webhooks and the affected resources and operations. 88 Webhooks []MutatingWebhookPatch `pulumi:"webhooks"` 89 } 90 91 // The set of arguments for constructing a MutatingWebhookConfigurationPatch resource. 92 type MutatingWebhookConfigurationPatchArgs 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 metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. 98 Metadata metav1.ObjectMetaPatchPtrInput 99 // Webhooks is a list of webhooks and the affected resources and operations. 100 Webhooks MutatingWebhookPatchArrayInput 101 } 102 103 func (MutatingWebhookConfigurationPatchArgs) ElementType() reflect.Type { 104 return reflect.TypeOf((*mutatingWebhookConfigurationPatchArgs)(nil)).Elem() 105 } 106 107 type MutatingWebhookConfigurationPatchInput interface { 108 pulumi.Input 109 110 ToMutatingWebhookConfigurationPatchOutput() MutatingWebhookConfigurationPatchOutput 111 ToMutatingWebhookConfigurationPatchOutputWithContext(ctx context.Context) MutatingWebhookConfigurationPatchOutput 112 } 113 114 func (*MutatingWebhookConfigurationPatch) ElementType() reflect.Type { 115 return reflect.TypeOf((**MutatingWebhookConfigurationPatch)(nil)).Elem() 116 } 117 118 func (i *MutatingWebhookConfigurationPatch) ToMutatingWebhookConfigurationPatchOutput() MutatingWebhookConfigurationPatchOutput { 119 return i.ToMutatingWebhookConfigurationPatchOutputWithContext(context.Background()) 120 } 121 122 func (i *MutatingWebhookConfigurationPatch) ToMutatingWebhookConfigurationPatchOutputWithContext(ctx context.Context) MutatingWebhookConfigurationPatchOutput { 123 return pulumi.ToOutputWithContext(ctx, i).(MutatingWebhookConfigurationPatchOutput) 124 } 125 126 // MutatingWebhookConfigurationPatchArrayInput is an input type that accepts MutatingWebhookConfigurationPatchArray and MutatingWebhookConfigurationPatchArrayOutput values. 127 // You can construct a concrete instance of `MutatingWebhookConfigurationPatchArrayInput` via: 128 // 129 // MutatingWebhookConfigurationPatchArray{ MutatingWebhookConfigurationPatchArgs{...} } 130 type MutatingWebhookConfigurationPatchArrayInput interface { 131 pulumi.Input 132 133 ToMutatingWebhookConfigurationPatchArrayOutput() MutatingWebhookConfigurationPatchArrayOutput 134 ToMutatingWebhookConfigurationPatchArrayOutputWithContext(context.Context) MutatingWebhookConfigurationPatchArrayOutput 135 } 136 137 type MutatingWebhookConfigurationPatchArray []MutatingWebhookConfigurationPatchInput 138 139 func (MutatingWebhookConfigurationPatchArray) ElementType() reflect.Type { 140 return reflect.TypeOf((*[]*MutatingWebhookConfigurationPatch)(nil)).Elem() 141 } 142 143 func (i MutatingWebhookConfigurationPatchArray) ToMutatingWebhookConfigurationPatchArrayOutput() MutatingWebhookConfigurationPatchArrayOutput { 144 return i.ToMutatingWebhookConfigurationPatchArrayOutputWithContext(context.Background()) 145 } 146 147 func (i MutatingWebhookConfigurationPatchArray) ToMutatingWebhookConfigurationPatchArrayOutputWithContext(ctx context.Context) MutatingWebhookConfigurationPatchArrayOutput { 148 return pulumi.ToOutputWithContext(ctx, i).(MutatingWebhookConfigurationPatchArrayOutput) 149 } 150 151 // MutatingWebhookConfigurationPatchMapInput is an input type that accepts MutatingWebhookConfigurationPatchMap and MutatingWebhookConfigurationPatchMapOutput values. 152 // You can construct a concrete instance of `MutatingWebhookConfigurationPatchMapInput` via: 153 // 154 // MutatingWebhookConfigurationPatchMap{ "key": MutatingWebhookConfigurationPatchArgs{...} } 155 type MutatingWebhookConfigurationPatchMapInput interface { 156 pulumi.Input 157 158 ToMutatingWebhookConfigurationPatchMapOutput() MutatingWebhookConfigurationPatchMapOutput 159 ToMutatingWebhookConfigurationPatchMapOutputWithContext(context.Context) MutatingWebhookConfigurationPatchMapOutput 160 } 161 162 type MutatingWebhookConfigurationPatchMap map[string]MutatingWebhookConfigurationPatchInput 163 164 func (MutatingWebhookConfigurationPatchMap) ElementType() reflect.Type { 165 return reflect.TypeOf((*map[string]*MutatingWebhookConfigurationPatch)(nil)).Elem() 166 } 167 168 func (i MutatingWebhookConfigurationPatchMap) ToMutatingWebhookConfigurationPatchMapOutput() MutatingWebhookConfigurationPatchMapOutput { 169 return i.ToMutatingWebhookConfigurationPatchMapOutputWithContext(context.Background()) 170 } 171 172 func (i MutatingWebhookConfigurationPatchMap) ToMutatingWebhookConfigurationPatchMapOutputWithContext(ctx context.Context) MutatingWebhookConfigurationPatchMapOutput { 173 return pulumi.ToOutputWithContext(ctx, i).(MutatingWebhookConfigurationPatchMapOutput) 174 } 175 176 type MutatingWebhookConfigurationPatchOutput struct{ *pulumi.OutputState } 177 178 func (MutatingWebhookConfigurationPatchOutput) ElementType() reflect.Type { 179 return reflect.TypeOf((**MutatingWebhookConfigurationPatch)(nil)).Elem() 180 } 181 182 func (o MutatingWebhookConfigurationPatchOutput) ToMutatingWebhookConfigurationPatchOutput() MutatingWebhookConfigurationPatchOutput { 183 return o 184 } 185 186 func (o MutatingWebhookConfigurationPatchOutput) ToMutatingWebhookConfigurationPatchOutputWithContext(ctx context.Context) MutatingWebhookConfigurationPatchOutput { 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 MutatingWebhookConfigurationPatchOutput) ApiVersion() pulumi.StringPtrOutput { 192 return o.ApplyT(func(v *MutatingWebhookConfigurationPatch) 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 MutatingWebhookConfigurationPatchOutput) Kind() pulumi.StringPtrOutput { 197 return o.ApplyT(func(v *MutatingWebhookConfigurationPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 198 } 199 200 // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. 201 func (o MutatingWebhookConfigurationPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 202 return o.ApplyT(func(v *MutatingWebhookConfigurationPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 203 } 204 205 // Webhooks is a list of webhooks and the affected resources and operations. 206 func (o MutatingWebhookConfigurationPatchOutput) Webhooks() MutatingWebhookPatchArrayOutput { 207 return o.ApplyT(func(v *MutatingWebhookConfigurationPatch) MutatingWebhookPatchArrayOutput { return v.Webhooks }).(MutatingWebhookPatchArrayOutput) 208 } 209 210 type MutatingWebhookConfigurationPatchArrayOutput struct{ *pulumi.OutputState } 211 212 func (MutatingWebhookConfigurationPatchArrayOutput) ElementType() reflect.Type { 213 return reflect.TypeOf((*[]*MutatingWebhookConfigurationPatch)(nil)).Elem() 214 } 215 216 func (o MutatingWebhookConfigurationPatchArrayOutput) ToMutatingWebhookConfigurationPatchArrayOutput() MutatingWebhookConfigurationPatchArrayOutput { 217 return o 218 } 219 220 func (o MutatingWebhookConfigurationPatchArrayOutput) ToMutatingWebhookConfigurationPatchArrayOutputWithContext(ctx context.Context) MutatingWebhookConfigurationPatchArrayOutput { 221 return o 222 } 223 224 func (o MutatingWebhookConfigurationPatchArrayOutput) Index(i pulumi.IntInput) MutatingWebhookConfigurationPatchOutput { 225 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MutatingWebhookConfigurationPatch { 226 return vs[0].([]*MutatingWebhookConfigurationPatch)[vs[1].(int)] 227 }).(MutatingWebhookConfigurationPatchOutput) 228 } 229 230 type MutatingWebhookConfigurationPatchMapOutput struct{ *pulumi.OutputState } 231 232 func (MutatingWebhookConfigurationPatchMapOutput) ElementType() reflect.Type { 233 return reflect.TypeOf((*map[string]*MutatingWebhookConfigurationPatch)(nil)).Elem() 234 } 235 236 func (o MutatingWebhookConfigurationPatchMapOutput) ToMutatingWebhookConfigurationPatchMapOutput() MutatingWebhookConfigurationPatchMapOutput { 237 return o 238 } 239 240 func (o MutatingWebhookConfigurationPatchMapOutput) ToMutatingWebhookConfigurationPatchMapOutputWithContext(ctx context.Context) MutatingWebhookConfigurationPatchMapOutput { 241 return o 242 } 243 244 func (o MutatingWebhookConfigurationPatchMapOutput) MapIndex(k pulumi.StringInput) MutatingWebhookConfigurationPatchOutput { 245 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MutatingWebhookConfigurationPatch { 246 return vs[0].(map[string]*MutatingWebhookConfigurationPatch)[vs[1].(string)] 247 }).(MutatingWebhookConfigurationPatchOutput) 248 } 249 250 func init() { 251 pulumi.RegisterInputType(reflect.TypeOf((*MutatingWebhookConfigurationPatchInput)(nil)).Elem(), &MutatingWebhookConfigurationPatch{}) 252 pulumi.RegisterInputType(reflect.TypeOf((*MutatingWebhookConfigurationPatchArrayInput)(nil)).Elem(), MutatingWebhookConfigurationPatchArray{}) 253 pulumi.RegisterInputType(reflect.TypeOf((*MutatingWebhookConfigurationPatchMapInput)(nil)).Elem(), MutatingWebhookConfigurationPatchMap{}) 254 pulumi.RegisterOutputType(MutatingWebhookConfigurationPatchOutput{}) 255 pulumi.RegisterOutputType(MutatingWebhookConfigurationPatchArrayOutput{}) 256 pulumi.RegisterOutputType(MutatingWebhookConfigurationPatchMapOutput{}) 257 }