github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/apiregistration/v1beta1/apiservice.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 // APIService represents a server for a particular GroupVersion. Name must be "version.group". 15 type APIService 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 metav1.ObjectMetaPtrOutput `pulumi:"metadata"` 23 // Spec contains information for locating and communicating with a server 24 Spec APIServiceSpecPtrOutput `pulumi:"spec"` 25 // Status contains derived information about an API server 26 Status APIServiceStatusPtrOutput `pulumi:"status"` 27 } 28 29 // NewAPIService registers a new resource with the given unique name, arguments, and options. 30 func NewAPIService(ctx *pulumi.Context, 31 name string, args *APIServiceArgs, opts ...pulumi.ResourceOption) (*APIService, error) { 32 if args == nil { 33 args = &APIServiceArgs{} 34 } 35 36 args.ApiVersion = pulumi.StringPtr("apiregistration.k8s.io/v1beta1") 37 args.Kind = pulumi.StringPtr("APIService") 38 aliases := pulumi.Aliases([]pulumi.Alias{ 39 { 40 Type: pulumi.String("kubernetes:apiregistration.k8s.io/v1:APIService"), 41 }, 42 { 43 Type: pulumi.String("kubernetes:apiregistration/v1:APIService"), 44 }, 45 { 46 Type: pulumi.String("kubernetes:apiregistration/v1beta1:APIService"), 47 }, 48 }) 49 opts = append(opts, aliases) 50 var resource APIService 51 err := ctx.RegisterResource("kubernetes:apiregistration.k8s.io/v1beta1:APIService", name, args, &resource, opts...) 52 if err != nil { 53 return nil, err 54 } 55 return &resource, nil 56 } 57 58 // GetAPIService gets an existing APIService resource's state with the given name, ID, and optional 59 // state properties that are used to uniquely qualify the lookup (nil if not required). 60 func GetAPIService(ctx *pulumi.Context, 61 name string, id pulumi.IDInput, state *APIServiceState, opts ...pulumi.ResourceOption) (*APIService, error) { 62 var resource APIService 63 err := ctx.ReadResource("kubernetes:apiregistration.k8s.io/v1beta1:APIService", name, id, state, &resource, opts...) 64 if err != nil { 65 return nil, err 66 } 67 return &resource, nil 68 } 69 70 // Input properties used for looking up and filtering APIService resources. 71 type apiserviceState struct { 72 } 73 74 type APIServiceState struct { 75 } 76 77 func (APIServiceState) ElementType() reflect.Type { 78 return reflect.TypeOf((*apiserviceState)(nil)).Elem() 79 } 80 81 type apiserviceArgs struct { 82 // 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 83 ApiVersion *string `pulumi:"apiVersion"` 84 // 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 85 Kind *string `pulumi:"kind"` 86 Metadata *metav1.ObjectMeta `pulumi:"metadata"` 87 // Spec contains information for locating and communicating with a server 88 Spec *APIServiceSpec `pulumi:"spec"` 89 } 90 91 // The set of arguments for constructing a APIService resource. 92 type APIServiceArgs 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 Metadata metav1.ObjectMetaPtrInput 98 // Spec contains information for locating and communicating with a server 99 Spec APIServiceSpecPtrInput 100 } 101 102 func (APIServiceArgs) ElementType() reflect.Type { 103 return reflect.TypeOf((*apiserviceArgs)(nil)).Elem() 104 } 105 106 type APIServiceInput interface { 107 pulumi.Input 108 109 ToAPIServiceOutput() APIServiceOutput 110 ToAPIServiceOutputWithContext(ctx context.Context) APIServiceOutput 111 } 112 113 func (*APIService) ElementType() reflect.Type { 114 return reflect.TypeOf((**APIService)(nil)).Elem() 115 } 116 117 func (i *APIService) ToAPIServiceOutput() APIServiceOutput { 118 return i.ToAPIServiceOutputWithContext(context.Background()) 119 } 120 121 func (i *APIService) ToAPIServiceOutputWithContext(ctx context.Context) APIServiceOutput { 122 return pulumi.ToOutputWithContext(ctx, i).(APIServiceOutput) 123 } 124 125 // APIServiceArrayInput is an input type that accepts APIServiceArray and APIServiceArrayOutput values. 126 // You can construct a concrete instance of `APIServiceArrayInput` via: 127 // 128 // APIServiceArray{ APIServiceArgs{...} } 129 type APIServiceArrayInput interface { 130 pulumi.Input 131 132 ToAPIServiceArrayOutput() APIServiceArrayOutput 133 ToAPIServiceArrayOutputWithContext(context.Context) APIServiceArrayOutput 134 } 135 136 type APIServiceArray []APIServiceInput 137 138 func (APIServiceArray) ElementType() reflect.Type { 139 return reflect.TypeOf((*[]*APIService)(nil)).Elem() 140 } 141 142 func (i APIServiceArray) ToAPIServiceArrayOutput() APIServiceArrayOutput { 143 return i.ToAPIServiceArrayOutputWithContext(context.Background()) 144 } 145 146 func (i APIServiceArray) ToAPIServiceArrayOutputWithContext(ctx context.Context) APIServiceArrayOutput { 147 return pulumi.ToOutputWithContext(ctx, i).(APIServiceArrayOutput) 148 } 149 150 // APIServiceMapInput is an input type that accepts APIServiceMap and APIServiceMapOutput values. 151 // You can construct a concrete instance of `APIServiceMapInput` via: 152 // 153 // APIServiceMap{ "key": APIServiceArgs{...} } 154 type APIServiceMapInput interface { 155 pulumi.Input 156 157 ToAPIServiceMapOutput() APIServiceMapOutput 158 ToAPIServiceMapOutputWithContext(context.Context) APIServiceMapOutput 159 } 160 161 type APIServiceMap map[string]APIServiceInput 162 163 func (APIServiceMap) ElementType() reflect.Type { 164 return reflect.TypeOf((*map[string]*APIService)(nil)).Elem() 165 } 166 167 func (i APIServiceMap) ToAPIServiceMapOutput() APIServiceMapOutput { 168 return i.ToAPIServiceMapOutputWithContext(context.Background()) 169 } 170 171 func (i APIServiceMap) ToAPIServiceMapOutputWithContext(ctx context.Context) APIServiceMapOutput { 172 return pulumi.ToOutputWithContext(ctx, i).(APIServiceMapOutput) 173 } 174 175 type APIServiceOutput struct{ *pulumi.OutputState } 176 177 func (APIServiceOutput) ElementType() reflect.Type { 178 return reflect.TypeOf((**APIService)(nil)).Elem() 179 } 180 181 func (o APIServiceOutput) ToAPIServiceOutput() APIServiceOutput { 182 return o 183 } 184 185 func (o APIServiceOutput) ToAPIServiceOutputWithContext(ctx context.Context) APIServiceOutput { 186 return o 187 } 188 189 // 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 190 func (o APIServiceOutput) ApiVersion() pulumi.StringPtrOutput { 191 return o.ApplyT(func(v *APIService) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 192 } 193 194 // 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 195 func (o APIServiceOutput) Kind() pulumi.StringPtrOutput { 196 return o.ApplyT(func(v *APIService) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 197 } 198 199 func (o APIServiceOutput) Metadata() metav1.ObjectMetaPtrOutput { 200 return o.ApplyT(func(v *APIService) metav1.ObjectMetaPtrOutput { return v.Metadata }).(metav1.ObjectMetaPtrOutput) 201 } 202 203 // Spec contains information for locating and communicating with a server 204 func (o APIServiceOutput) Spec() APIServiceSpecPtrOutput { 205 return o.ApplyT(func(v *APIService) APIServiceSpecPtrOutput { return v.Spec }).(APIServiceSpecPtrOutput) 206 } 207 208 // Status contains derived information about an API server 209 func (o APIServiceOutput) Status() APIServiceStatusPtrOutput { 210 return o.ApplyT(func(v *APIService) APIServiceStatusPtrOutput { return v.Status }).(APIServiceStatusPtrOutput) 211 } 212 213 type APIServiceArrayOutput struct{ *pulumi.OutputState } 214 215 func (APIServiceArrayOutput) ElementType() reflect.Type { 216 return reflect.TypeOf((*[]*APIService)(nil)).Elem() 217 } 218 219 func (o APIServiceArrayOutput) ToAPIServiceArrayOutput() APIServiceArrayOutput { 220 return o 221 } 222 223 func (o APIServiceArrayOutput) ToAPIServiceArrayOutputWithContext(ctx context.Context) APIServiceArrayOutput { 224 return o 225 } 226 227 func (o APIServiceArrayOutput) Index(i pulumi.IntInput) APIServiceOutput { 228 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *APIService { 229 return vs[0].([]*APIService)[vs[1].(int)] 230 }).(APIServiceOutput) 231 } 232 233 type APIServiceMapOutput struct{ *pulumi.OutputState } 234 235 func (APIServiceMapOutput) ElementType() reflect.Type { 236 return reflect.TypeOf((*map[string]*APIService)(nil)).Elem() 237 } 238 239 func (o APIServiceMapOutput) ToAPIServiceMapOutput() APIServiceMapOutput { 240 return o 241 } 242 243 func (o APIServiceMapOutput) ToAPIServiceMapOutputWithContext(ctx context.Context) APIServiceMapOutput { 244 return o 245 } 246 247 func (o APIServiceMapOutput) MapIndex(k pulumi.StringInput) APIServiceOutput { 248 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *APIService { 249 return vs[0].(map[string]*APIService)[vs[1].(string)] 250 }).(APIServiceOutput) 251 } 252 253 func init() { 254 pulumi.RegisterInputType(reflect.TypeOf((*APIServiceInput)(nil)).Elem(), &APIService{}) 255 pulumi.RegisterInputType(reflect.TypeOf((*APIServiceArrayInput)(nil)).Elem(), APIServiceArray{}) 256 pulumi.RegisterInputType(reflect.TypeOf((*APIServiceMapInput)(nil)).Elem(), APIServiceMap{}) 257 pulumi.RegisterOutputType(APIServiceOutput{}) 258 pulumi.RegisterOutputType(APIServiceArrayOutput{}) 259 pulumi.RegisterOutputType(APIServiceMapOutput{}) 260 }