github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/flowcontrol/v1alpha1/flowSchema.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 v1alpha1 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 // FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher". 15 type FlowSchema 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 // `metadata` is the 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 specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 25 Spec FlowSchemaSpecPtrOutput `pulumi:"spec"` 26 // `status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 27 Status FlowSchemaStatusPtrOutput `pulumi:"status"` 28 } 29 30 // NewFlowSchema registers a new resource with the given unique name, arguments, and options. 31 func NewFlowSchema(ctx *pulumi.Context, 32 name string, args *FlowSchemaArgs, opts ...pulumi.ResourceOption) (*FlowSchema, error) { 33 if args == nil { 34 args = &FlowSchemaArgs{} 35 } 36 37 args.ApiVersion = pulumi.StringPtr("flowcontrol.apiserver.k8s.io/v1alpha1") 38 args.Kind = pulumi.StringPtr("FlowSchema") 39 aliases := pulumi.Aliases([]pulumi.Alias{ 40 { 41 Type: pulumi.String("kubernetes:flowcontrol.apiserver.k8s.io/v1beta1:FlowSchema"), 42 }, 43 { 44 Type: pulumi.String("kubernetes:flowcontrol.apiserver.k8s.io/v1beta2:FlowSchema"), 45 }, 46 { 47 Type: pulumi.String("kubernetes:flowcontrol.apiserver.k8s.io/v1beta3:FlowSchema"), 48 }, 49 }) 50 opts = append(opts, aliases) 51 var resource FlowSchema 52 err := ctx.RegisterResource("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:FlowSchema", name, args, &resource, opts...) 53 if err != nil { 54 return nil, err 55 } 56 return &resource, nil 57 } 58 59 // GetFlowSchema gets an existing FlowSchema resource's state with the given name, ID, and optional 60 // state properties that are used to uniquely qualify the lookup (nil if not required). 61 func GetFlowSchema(ctx *pulumi.Context, 62 name string, id pulumi.IDInput, state *FlowSchemaState, opts ...pulumi.ResourceOption) (*FlowSchema, error) { 63 var resource FlowSchema 64 err := ctx.ReadResource("kubernetes:flowcontrol.apiserver.k8s.io/v1alpha1:FlowSchema", name, id, state, &resource, opts...) 65 if err != nil { 66 return nil, err 67 } 68 return &resource, nil 69 } 70 71 // Input properties used for looking up and filtering FlowSchema resources. 72 type flowSchemaState struct { 73 } 74 75 type FlowSchemaState struct { 76 } 77 78 func (FlowSchemaState) ElementType() reflect.Type { 79 return reflect.TypeOf((*flowSchemaState)(nil)).Elem() 80 } 81 82 type flowSchemaArgs struct { 83 // 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 84 ApiVersion *string `pulumi:"apiVersion"` 85 // 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 86 Kind *string `pulumi:"kind"` 87 // `metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 88 Metadata *metav1.ObjectMeta `pulumi:"metadata"` 89 // `spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 90 Spec *FlowSchemaSpec `pulumi:"spec"` 91 } 92 93 // The set of arguments for constructing a FlowSchema resource. 94 type FlowSchemaArgs struct { 95 // 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 96 ApiVersion pulumi.StringPtrInput 97 // 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 98 Kind pulumi.StringPtrInput 99 // `metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 100 Metadata metav1.ObjectMetaPtrInput 101 // `spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 102 Spec FlowSchemaSpecPtrInput 103 } 104 105 func (FlowSchemaArgs) ElementType() reflect.Type { 106 return reflect.TypeOf((*flowSchemaArgs)(nil)).Elem() 107 } 108 109 type FlowSchemaInput interface { 110 pulumi.Input 111 112 ToFlowSchemaOutput() FlowSchemaOutput 113 ToFlowSchemaOutputWithContext(ctx context.Context) FlowSchemaOutput 114 } 115 116 func (*FlowSchema) ElementType() reflect.Type { 117 return reflect.TypeOf((**FlowSchema)(nil)).Elem() 118 } 119 120 func (i *FlowSchema) ToFlowSchemaOutput() FlowSchemaOutput { 121 return i.ToFlowSchemaOutputWithContext(context.Background()) 122 } 123 124 func (i *FlowSchema) ToFlowSchemaOutputWithContext(ctx context.Context) FlowSchemaOutput { 125 return pulumi.ToOutputWithContext(ctx, i).(FlowSchemaOutput) 126 } 127 128 // FlowSchemaArrayInput is an input type that accepts FlowSchemaArray and FlowSchemaArrayOutput values. 129 // You can construct a concrete instance of `FlowSchemaArrayInput` via: 130 // 131 // FlowSchemaArray{ FlowSchemaArgs{...} } 132 type FlowSchemaArrayInput interface { 133 pulumi.Input 134 135 ToFlowSchemaArrayOutput() FlowSchemaArrayOutput 136 ToFlowSchemaArrayOutputWithContext(context.Context) FlowSchemaArrayOutput 137 } 138 139 type FlowSchemaArray []FlowSchemaInput 140 141 func (FlowSchemaArray) ElementType() reflect.Type { 142 return reflect.TypeOf((*[]*FlowSchema)(nil)).Elem() 143 } 144 145 func (i FlowSchemaArray) ToFlowSchemaArrayOutput() FlowSchemaArrayOutput { 146 return i.ToFlowSchemaArrayOutputWithContext(context.Background()) 147 } 148 149 func (i FlowSchemaArray) ToFlowSchemaArrayOutputWithContext(ctx context.Context) FlowSchemaArrayOutput { 150 return pulumi.ToOutputWithContext(ctx, i).(FlowSchemaArrayOutput) 151 } 152 153 // FlowSchemaMapInput is an input type that accepts FlowSchemaMap and FlowSchemaMapOutput values. 154 // You can construct a concrete instance of `FlowSchemaMapInput` via: 155 // 156 // FlowSchemaMap{ "key": FlowSchemaArgs{...} } 157 type FlowSchemaMapInput interface { 158 pulumi.Input 159 160 ToFlowSchemaMapOutput() FlowSchemaMapOutput 161 ToFlowSchemaMapOutputWithContext(context.Context) FlowSchemaMapOutput 162 } 163 164 type FlowSchemaMap map[string]FlowSchemaInput 165 166 func (FlowSchemaMap) ElementType() reflect.Type { 167 return reflect.TypeOf((*map[string]*FlowSchema)(nil)).Elem() 168 } 169 170 func (i FlowSchemaMap) ToFlowSchemaMapOutput() FlowSchemaMapOutput { 171 return i.ToFlowSchemaMapOutputWithContext(context.Background()) 172 } 173 174 func (i FlowSchemaMap) ToFlowSchemaMapOutputWithContext(ctx context.Context) FlowSchemaMapOutput { 175 return pulumi.ToOutputWithContext(ctx, i).(FlowSchemaMapOutput) 176 } 177 178 type FlowSchemaOutput struct{ *pulumi.OutputState } 179 180 func (FlowSchemaOutput) ElementType() reflect.Type { 181 return reflect.TypeOf((**FlowSchema)(nil)).Elem() 182 } 183 184 func (o FlowSchemaOutput) ToFlowSchemaOutput() FlowSchemaOutput { 185 return o 186 } 187 188 func (o FlowSchemaOutput) ToFlowSchemaOutputWithContext(ctx context.Context) FlowSchemaOutput { 189 return o 190 } 191 192 // 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 193 func (o FlowSchemaOutput) ApiVersion() pulumi.StringPtrOutput { 194 return o.ApplyT(func(v *FlowSchema) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 195 } 196 197 // 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 198 func (o FlowSchemaOutput) Kind() pulumi.StringPtrOutput { 199 return o.ApplyT(func(v *FlowSchema) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 200 } 201 202 // `metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 203 func (o FlowSchemaOutput) Metadata() metav1.ObjectMetaPtrOutput { 204 return o.ApplyT(func(v *FlowSchema) metav1.ObjectMetaPtrOutput { return v.Metadata }).(metav1.ObjectMetaPtrOutput) 205 } 206 207 // `spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 208 func (o FlowSchemaOutput) Spec() FlowSchemaSpecPtrOutput { 209 return o.ApplyT(func(v *FlowSchema) FlowSchemaSpecPtrOutput { return v.Spec }).(FlowSchemaSpecPtrOutput) 210 } 211 212 // `status` is the current status of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 213 func (o FlowSchemaOutput) Status() FlowSchemaStatusPtrOutput { 214 return o.ApplyT(func(v *FlowSchema) FlowSchemaStatusPtrOutput { return v.Status }).(FlowSchemaStatusPtrOutput) 215 } 216 217 type FlowSchemaArrayOutput struct{ *pulumi.OutputState } 218 219 func (FlowSchemaArrayOutput) ElementType() reflect.Type { 220 return reflect.TypeOf((*[]*FlowSchema)(nil)).Elem() 221 } 222 223 func (o FlowSchemaArrayOutput) ToFlowSchemaArrayOutput() FlowSchemaArrayOutput { 224 return o 225 } 226 227 func (o FlowSchemaArrayOutput) ToFlowSchemaArrayOutputWithContext(ctx context.Context) FlowSchemaArrayOutput { 228 return o 229 } 230 231 func (o FlowSchemaArrayOutput) Index(i pulumi.IntInput) FlowSchemaOutput { 232 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *FlowSchema { 233 return vs[0].([]*FlowSchema)[vs[1].(int)] 234 }).(FlowSchemaOutput) 235 } 236 237 type FlowSchemaMapOutput struct{ *pulumi.OutputState } 238 239 func (FlowSchemaMapOutput) ElementType() reflect.Type { 240 return reflect.TypeOf((*map[string]*FlowSchema)(nil)).Elem() 241 } 242 243 func (o FlowSchemaMapOutput) ToFlowSchemaMapOutput() FlowSchemaMapOutput { 244 return o 245 } 246 247 func (o FlowSchemaMapOutput) ToFlowSchemaMapOutputWithContext(ctx context.Context) FlowSchemaMapOutput { 248 return o 249 } 250 251 func (o FlowSchemaMapOutput) MapIndex(k pulumi.StringInput) FlowSchemaOutput { 252 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *FlowSchema { 253 return vs[0].(map[string]*FlowSchema)[vs[1].(string)] 254 }).(FlowSchemaOutput) 255 } 256 257 func init() { 258 pulumi.RegisterInputType(reflect.TypeOf((*FlowSchemaInput)(nil)).Elem(), &FlowSchema{}) 259 pulumi.RegisterInputType(reflect.TypeOf((*FlowSchemaArrayInput)(nil)).Elem(), FlowSchemaArray{}) 260 pulumi.RegisterInputType(reflect.TypeOf((*FlowSchemaMapInput)(nil)).Elem(), FlowSchemaMap{}) 261 pulumi.RegisterOutputType(FlowSchemaOutput{}) 262 pulumi.RegisterOutputType(FlowSchemaArrayOutput{}) 263 pulumi.RegisterOutputType(FlowSchemaMapOutput{}) 264 }