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