github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/admissionregistration/v1beta1/mutatingWebhookConfiguration.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 // 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. 15 type MutatingWebhookConfiguration 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 metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. 23 Metadata metav1.ObjectMetaPtrOutput `pulumi:"metadata"` 24 // Webhooks is a list of webhooks and the affected resources and operations. 25 Webhooks MutatingWebhookArrayOutput `pulumi:"webhooks"` 26 } 27 28 // NewMutatingWebhookConfiguration registers a new resource with the given unique name, arguments, and options. 29 func NewMutatingWebhookConfiguration(ctx *pulumi.Context, 30 name string, args *MutatingWebhookConfigurationArgs, opts ...pulumi.ResourceOption) (*MutatingWebhookConfiguration, error) { 31 if args == nil { 32 args = &MutatingWebhookConfigurationArgs{} 33 } 34 35 args.ApiVersion = pulumi.StringPtr("admissionregistration.k8s.io/v1beta1") 36 args.Kind = pulumi.StringPtr("MutatingWebhookConfiguration") 37 aliases := pulumi.Aliases([]pulumi.Alias{ 38 { 39 Type: pulumi.String("kubernetes:admissionregistration.k8s.io/v1:MutatingWebhookConfiguration"), 40 }, 41 }) 42 opts = append(opts, aliases) 43 var resource MutatingWebhookConfiguration 44 err := ctx.RegisterResource("kubernetes:admissionregistration.k8s.io/v1beta1:MutatingWebhookConfiguration", name, args, &resource, opts...) 45 if err != nil { 46 return nil, err 47 } 48 return &resource, nil 49 } 50 51 // GetMutatingWebhookConfiguration gets an existing MutatingWebhookConfiguration 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 GetMutatingWebhookConfiguration(ctx *pulumi.Context, 54 name string, id pulumi.IDInput, state *MutatingWebhookConfigurationState, opts ...pulumi.ResourceOption) (*MutatingWebhookConfiguration, error) { 55 var resource MutatingWebhookConfiguration 56 err := ctx.ReadResource("kubernetes:admissionregistration.k8s.io/v1beta1:MutatingWebhookConfiguration", 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 MutatingWebhookConfiguration resources. 64 type mutatingWebhookConfigurationState struct { 65 } 66 67 type MutatingWebhookConfigurationState struct { 68 } 69 70 func (MutatingWebhookConfigurationState) ElementType() reflect.Type { 71 return reflect.TypeOf((*mutatingWebhookConfigurationState)(nil)).Elem() 72 } 73 74 type mutatingWebhookConfigurationArgs 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 metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. 80 Metadata *metav1.ObjectMeta `pulumi:"metadata"` 81 // Webhooks is a list of webhooks and the affected resources and operations. 82 Webhooks []MutatingWebhook `pulumi:"webhooks"` 83 } 84 85 // The set of arguments for constructing a MutatingWebhookConfiguration resource. 86 type MutatingWebhookConfigurationArgs 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 metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. 92 Metadata metav1.ObjectMetaPtrInput 93 // Webhooks is a list of webhooks and the affected resources and operations. 94 Webhooks MutatingWebhookArrayInput 95 } 96 97 func (MutatingWebhookConfigurationArgs) ElementType() reflect.Type { 98 return reflect.TypeOf((*mutatingWebhookConfigurationArgs)(nil)).Elem() 99 } 100 101 type MutatingWebhookConfigurationInput interface { 102 pulumi.Input 103 104 ToMutatingWebhookConfigurationOutput() MutatingWebhookConfigurationOutput 105 ToMutatingWebhookConfigurationOutputWithContext(ctx context.Context) MutatingWebhookConfigurationOutput 106 } 107 108 func (*MutatingWebhookConfiguration) ElementType() reflect.Type { 109 return reflect.TypeOf((**MutatingWebhookConfiguration)(nil)).Elem() 110 } 111 112 func (i *MutatingWebhookConfiguration) ToMutatingWebhookConfigurationOutput() MutatingWebhookConfigurationOutput { 113 return i.ToMutatingWebhookConfigurationOutputWithContext(context.Background()) 114 } 115 116 func (i *MutatingWebhookConfiguration) ToMutatingWebhookConfigurationOutputWithContext(ctx context.Context) MutatingWebhookConfigurationOutput { 117 return pulumi.ToOutputWithContext(ctx, i).(MutatingWebhookConfigurationOutput) 118 } 119 120 // MutatingWebhookConfigurationArrayInput is an input type that accepts MutatingWebhookConfigurationArray and MutatingWebhookConfigurationArrayOutput values. 121 // You can construct a concrete instance of `MutatingWebhookConfigurationArrayInput` via: 122 // 123 // MutatingWebhookConfigurationArray{ MutatingWebhookConfigurationArgs{...} } 124 type MutatingWebhookConfigurationArrayInput interface { 125 pulumi.Input 126 127 ToMutatingWebhookConfigurationArrayOutput() MutatingWebhookConfigurationArrayOutput 128 ToMutatingWebhookConfigurationArrayOutputWithContext(context.Context) MutatingWebhookConfigurationArrayOutput 129 } 130 131 type MutatingWebhookConfigurationArray []MutatingWebhookConfigurationInput 132 133 func (MutatingWebhookConfigurationArray) ElementType() reflect.Type { 134 return reflect.TypeOf((*[]*MutatingWebhookConfiguration)(nil)).Elem() 135 } 136 137 func (i MutatingWebhookConfigurationArray) ToMutatingWebhookConfigurationArrayOutput() MutatingWebhookConfigurationArrayOutput { 138 return i.ToMutatingWebhookConfigurationArrayOutputWithContext(context.Background()) 139 } 140 141 func (i MutatingWebhookConfigurationArray) ToMutatingWebhookConfigurationArrayOutputWithContext(ctx context.Context) MutatingWebhookConfigurationArrayOutput { 142 return pulumi.ToOutputWithContext(ctx, i).(MutatingWebhookConfigurationArrayOutput) 143 } 144 145 // MutatingWebhookConfigurationMapInput is an input type that accepts MutatingWebhookConfigurationMap and MutatingWebhookConfigurationMapOutput values. 146 // You can construct a concrete instance of `MutatingWebhookConfigurationMapInput` via: 147 // 148 // MutatingWebhookConfigurationMap{ "key": MutatingWebhookConfigurationArgs{...} } 149 type MutatingWebhookConfigurationMapInput interface { 150 pulumi.Input 151 152 ToMutatingWebhookConfigurationMapOutput() MutatingWebhookConfigurationMapOutput 153 ToMutatingWebhookConfigurationMapOutputWithContext(context.Context) MutatingWebhookConfigurationMapOutput 154 } 155 156 type MutatingWebhookConfigurationMap map[string]MutatingWebhookConfigurationInput 157 158 func (MutatingWebhookConfigurationMap) ElementType() reflect.Type { 159 return reflect.TypeOf((*map[string]*MutatingWebhookConfiguration)(nil)).Elem() 160 } 161 162 func (i MutatingWebhookConfigurationMap) ToMutatingWebhookConfigurationMapOutput() MutatingWebhookConfigurationMapOutput { 163 return i.ToMutatingWebhookConfigurationMapOutputWithContext(context.Background()) 164 } 165 166 func (i MutatingWebhookConfigurationMap) ToMutatingWebhookConfigurationMapOutputWithContext(ctx context.Context) MutatingWebhookConfigurationMapOutput { 167 return pulumi.ToOutputWithContext(ctx, i).(MutatingWebhookConfigurationMapOutput) 168 } 169 170 type MutatingWebhookConfigurationOutput struct{ *pulumi.OutputState } 171 172 func (MutatingWebhookConfigurationOutput) ElementType() reflect.Type { 173 return reflect.TypeOf((**MutatingWebhookConfiguration)(nil)).Elem() 174 } 175 176 func (o MutatingWebhookConfigurationOutput) ToMutatingWebhookConfigurationOutput() MutatingWebhookConfigurationOutput { 177 return o 178 } 179 180 func (o MutatingWebhookConfigurationOutput) ToMutatingWebhookConfigurationOutputWithContext(ctx context.Context) MutatingWebhookConfigurationOutput { 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 MutatingWebhookConfigurationOutput) ApiVersion() pulumi.StringPtrOutput { 186 return o.ApplyT(func(v *MutatingWebhookConfiguration) 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 MutatingWebhookConfigurationOutput) Kind() pulumi.StringPtrOutput { 191 return o.ApplyT(func(v *MutatingWebhookConfiguration) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 192 } 193 194 // Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. 195 func (o MutatingWebhookConfigurationOutput) Metadata() metav1.ObjectMetaPtrOutput { 196 return o.ApplyT(func(v *MutatingWebhookConfiguration) metav1.ObjectMetaPtrOutput { return v.Metadata }).(metav1.ObjectMetaPtrOutput) 197 } 198 199 // Webhooks is a list of webhooks and the affected resources and operations. 200 func (o MutatingWebhookConfigurationOutput) Webhooks() MutatingWebhookArrayOutput { 201 return o.ApplyT(func(v *MutatingWebhookConfiguration) MutatingWebhookArrayOutput { return v.Webhooks }).(MutatingWebhookArrayOutput) 202 } 203 204 type MutatingWebhookConfigurationArrayOutput struct{ *pulumi.OutputState } 205 206 func (MutatingWebhookConfigurationArrayOutput) ElementType() reflect.Type { 207 return reflect.TypeOf((*[]*MutatingWebhookConfiguration)(nil)).Elem() 208 } 209 210 func (o MutatingWebhookConfigurationArrayOutput) ToMutatingWebhookConfigurationArrayOutput() MutatingWebhookConfigurationArrayOutput { 211 return o 212 } 213 214 func (o MutatingWebhookConfigurationArrayOutput) ToMutatingWebhookConfigurationArrayOutputWithContext(ctx context.Context) MutatingWebhookConfigurationArrayOutput { 215 return o 216 } 217 218 func (o MutatingWebhookConfigurationArrayOutput) Index(i pulumi.IntInput) MutatingWebhookConfigurationOutput { 219 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *MutatingWebhookConfiguration { 220 return vs[0].([]*MutatingWebhookConfiguration)[vs[1].(int)] 221 }).(MutatingWebhookConfigurationOutput) 222 } 223 224 type MutatingWebhookConfigurationMapOutput struct{ *pulumi.OutputState } 225 226 func (MutatingWebhookConfigurationMapOutput) ElementType() reflect.Type { 227 return reflect.TypeOf((*map[string]*MutatingWebhookConfiguration)(nil)).Elem() 228 } 229 230 func (o MutatingWebhookConfigurationMapOutput) ToMutatingWebhookConfigurationMapOutput() MutatingWebhookConfigurationMapOutput { 231 return o 232 } 233 234 func (o MutatingWebhookConfigurationMapOutput) ToMutatingWebhookConfigurationMapOutputWithContext(ctx context.Context) MutatingWebhookConfigurationMapOutput { 235 return o 236 } 237 238 func (o MutatingWebhookConfigurationMapOutput) MapIndex(k pulumi.StringInput) MutatingWebhookConfigurationOutput { 239 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *MutatingWebhookConfiguration { 240 return vs[0].(map[string]*MutatingWebhookConfiguration)[vs[1].(string)] 241 }).(MutatingWebhookConfigurationOutput) 242 } 243 244 func init() { 245 pulumi.RegisterInputType(reflect.TypeOf((*MutatingWebhookConfigurationInput)(nil)).Elem(), &MutatingWebhookConfiguration{}) 246 pulumi.RegisterInputType(reflect.TypeOf((*MutatingWebhookConfigurationArrayInput)(nil)).Elem(), MutatingWebhookConfigurationArray{}) 247 pulumi.RegisterInputType(reflect.TypeOf((*MutatingWebhookConfigurationMapInput)(nil)).Elem(), MutatingWebhookConfigurationMap{}) 248 pulumi.RegisterOutputType(MutatingWebhookConfigurationOutput{}) 249 pulumi.RegisterOutputType(MutatingWebhookConfigurationArrayOutput{}) 250 pulumi.RegisterOutputType(MutatingWebhookConfigurationMapOutput{}) 251 }