github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/apiregistration/v1/apiserviceList.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 "errors" 11 metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/meta/v1" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // APIServiceList is a list of APIService objects. 16 type APIServiceList struct { 17 pulumi.CustomResourceState 18 19 // 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 20 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 21 // Items is the list of APIService 22 Items APIServiceTypeArrayOutput `pulumi:"items"` 23 // 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 24 Kind pulumi.StringPtrOutput `pulumi:"kind"` 25 // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 26 Metadata metav1.ListMetaPtrOutput `pulumi:"metadata"` 27 } 28 29 // NewAPIServiceList registers a new resource with the given unique name, arguments, and options. 30 func NewAPIServiceList(ctx *pulumi.Context, 31 name string, args *APIServiceListArgs, opts ...pulumi.ResourceOption) (*APIServiceList, error) { 32 if args == nil { 33 return nil, errors.New("missing one or more required arguments") 34 } 35 36 if args.Items == nil { 37 return nil, errors.New("invalid value for required argument 'Items'") 38 } 39 args.ApiVersion = pulumi.StringPtr("apiregistration.k8s.io/v1") 40 args.Kind = pulumi.StringPtr("APIServiceList") 41 aliases := pulumi.Aliases([]pulumi.Alias{ 42 { 43 Type: pulumi.String("kubernetes:apiregistration/v1:APIServiceList"), 44 }, 45 }) 46 opts = append(opts, aliases) 47 var resource APIServiceList 48 err := ctx.RegisterResource("kubernetes:apiregistration.k8s.io/v1:APIServiceList", name, args, &resource, opts...) 49 if err != nil { 50 return nil, err 51 } 52 return &resource, nil 53 } 54 55 // GetAPIServiceList gets an existing APIServiceList resource's state with the given name, ID, and optional 56 // state properties that are used to uniquely qualify the lookup (nil if not required). 57 func GetAPIServiceList(ctx *pulumi.Context, 58 name string, id pulumi.IDInput, state *APIServiceListState, opts ...pulumi.ResourceOption) (*APIServiceList, error) { 59 var resource APIServiceList 60 err := ctx.ReadResource("kubernetes:apiregistration.k8s.io/v1:APIServiceList", name, id, state, &resource, opts...) 61 if err != nil { 62 return nil, err 63 } 64 return &resource, nil 65 } 66 67 // Input properties used for looking up and filtering APIServiceList resources. 68 type apiserviceListState struct { 69 } 70 71 type APIServiceListState struct { 72 } 73 74 func (APIServiceListState) ElementType() reflect.Type { 75 return reflect.TypeOf((*apiserviceListState)(nil)).Elem() 76 } 77 78 type apiserviceListArgs struct { 79 // 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 80 ApiVersion *string `pulumi:"apiVersion"` 81 // Items is the list of APIService 82 Items []APIServiceType `pulumi:"items"` 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 list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 86 Metadata *metav1.ListMeta `pulumi:"metadata"` 87 } 88 89 // The set of arguments for constructing a APIServiceList resource. 90 type APIServiceListArgs struct { 91 // 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 92 ApiVersion pulumi.StringPtrInput 93 // Items is the list of APIService 94 Items APIServiceTypeArrayInput 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 list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 98 Metadata metav1.ListMetaPtrInput 99 } 100 101 func (APIServiceListArgs) ElementType() reflect.Type { 102 return reflect.TypeOf((*apiserviceListArgs)(nil)).Elem() 103 } 104 105 type APIServiceListInput interface { 106 pulumi.Input 107 108 ToAPIServiceListOutput() APIServiceListOutput 109 ToAPIServiceListOutputWithContext(ctx context.Context) APIServiceListOutput 110 } 111 112 func (*APIServiceList) ElementType() reflect.Type { 113 return reflect.TypeOf((**APIServiceList)(nil)).Elem() 114 } 115 116 func (i *APIServiceList) ToAPIServiceListOutput() APIServiceListOutput { 117 return i.ToAPIServiceListOutputWithContext(context.Background()) 118 } 119 120 func (i *APIServiceList) ToAPIServiceListOutputWithContext(ctx context.Context) APIServiceListOutput { 121 return pulumi.ToOutputWithContext(ctx, i).(APIServiceListOutput) 122 } 123 124 // APIServiceListArrayInput is an input type that accepts APIServiceListArray and APIServiceListArrayOutput values. 125 // You can construct a concrete instance of `APIServiceListArrayInput` via: 126 // 127 // APIServiceListArray{ APIServiceListArgs{...} } 128 type APIServiceListArrayInput interface { 129 pulumi.Input 130 131 ToAPIServiceListArrayOutput() APIServiceListArrayOutput 132 ToAPIServiceListArrayOutputWithContext(context.Context) APIServiceListArrayOutput 133 } 134 135 type APIServiceListArray []APIServiceListInput 136 137 func (APIServiceListArray) ElementType() reflect.Type { 138 return reflect.TypeOf((*[]*APIServiceList)(nil)).Elem() 139 } 140 141 func (i APIServiceListArray) ToAPIServiceListArrayOutput() APIServiceListArrayOutput { 142 return i.ToAPIServiceListArrayOutputWithContext(context.Background()) 143 } 144 145 func (i APIServiceListArray) ToAPIServiceListArrayOutputWithContext(ctx context.Context) APIServiceListArrayOutput { 146 return pulumi.ToOutputWithContext(ctx, i).(APIServiceListArrayOutput) 147 } 148 149 // APIServiceListMapInput is an input type that accepts APIServiceListMap and APIServiceListMapOutput values. 150 // You can construct a concrete instance of `APIServiceListMapInput` via: 151 // 152 // APIServiceListMap{ "key": APIServiceListArgs{...} } 153 type APIServiceListMapInput interface { 154 pulumi.Input 155 156 ToAPIServiceListMapOutput() APIServiceListMapOutput 157 ToAPIServiceListMapOutputWithContext(context.Context) APIServiceListMapOutput 158 } 159 160 type APIServiceListMap map[string]APIServiceListInput 161 162 func (APIServiceListMap) ElementType() reflect.Type { 163 return reflect.TypeOf((*map[string]*APIServiceList)(nil)).Elem() 164 } 165 166 func (i APIServiceListMap) ToAPIServiceListMapOutput() APIServiceListMapOutput { 167 return i.ToAPIServiceListMapOutputWithContext(context.Background()) 168 } 169 170 func (i APIServiceListMap) ToAPIServiceListMapOutputWithContext(ctx context.Context) APIServiceListMapOutput { 171 return pulumi.ToOutputWithContext(ctx, i).(APIServiceListMapOutput) 172 } 173 174 type APIServiceListOutput struct{ *pulumi.OutputState } 175 176 func (APIServiceListOutput) ElementType() reflect.Type { 177 return reflect.TypeOf((**APIServiceList)(nil)).Elem() 178 } 179 180 func (o APIServiceListOutput) ToAPIServiceListOutput() APIServiceListOutput { 181 return o 182 } 183 184 func (o APIServiceListOutput) ToAPIServiceListOutputWithContext(ctx context.Context) APIServiceListOutput { 185 return o 186 } 187 188 // 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 189 func (o APIServiceListOutput) ApiVersion() pulumi.StringPtrOutput { 190 return o.ApplyT(func(v *APIServiceList) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 191 } 192 193 // Items is the list of APIService 194 func (o APIServiceListOutput) Items() APIServiceTypeArrayOutput { 195 return o.ApplyT(func(v *APIServiceList) APIServiceTypeArrayOutput { return v.Items }).(APIServiceTypeArrayOutput) 196 } 197 198 // 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 199 func (o APIServiceListOutput) Kind() pulumi.StringPtrOutput { 200 return o.ApplyT(func(v *APIServiceList) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 201 } 202 203 // Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 204 func (o APIServiceListOutput) Metadata() metav1.ListMetaPtrOutput { 205 return o.ApplyT(func(v *APIServiceList) metav1.ListMetaPtrOutput { return v.Metadata }).(metav1.ListMetaPtrOutput) 206 } 207 208 type APIServiceListArrayOutput struct{ *pulumi.OutputState } 209 210 func (APIServiceListArrayOutput) ElementType() reflect.Type { 211 return reflect.TypeOf((*[]*APIServiceList)(nil)).Elem() 212 } 213 214 func (o APIServiceListArrayOutput) ToAPIServiceListArrayOutput() APIServiceListArrayOutput { 215 return o 216 } 217 218 func (o APIServiceListArrayOutput) ToAPIServiceListArrayOutputWithContext(ctx context.Context) APIServiceListArrayOutput { 219 return o 220 } 221 222 func (o APIServiceListArrayOutput) Index(i pulumi.IntInput) APIServiceListOutput { 223 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *APIServiceList { 224 return vs[0].([]*APIServiceList)[vs[1].(int)] 225 }).(APIServiceListOutput) 226 } 227 228 type APIServiceListMapOutput struct{ *pulumi.OutputState } 229 230 func (APIServiceListMapOutput) ElementType() reflect.Type { 231 return reflect.TypeOf((*map[string]*APIServiceList)(nil)).Elem() 232 } 233 234 func (o APIServiceListMapOutput) ToAPIServiceListMapOutput() APIServiceListMapOutput { 235 return o 236 } 237 238 func (o APIServiceListMapOutput) ToAPIServiceListMapOutputWithContext(ctx context.Context) APIServiceListMapOutput { 239 return o 240 } 241 242 func (o APIServiceListMapOutput) MapIndex(k pulumi.StringInput) APIServiceListOutput { 243 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *APIServiceList { 244 return vs[0].(map[string]*APIServiceList)[vs[1].(string)] 245 }).(APIServiceListOutput) 246 } 247 248 func init() { 249 pulumi.RegisterInputType(reflect.TypeOf((*APIServiceListInput)(nil)).Elem(), &APIServiceList{}) 250 pulumi.RegisterInputType(reflect.TypeOf((*APIServiceListArrayInput)(nil)).Elem(), APIServiceListArray{}) 251 pulumi.RegisterInputType(reflect.TypeOf((*APIServiceListMapInput)(nil)).Elem(), APIServiceListMap{}) 252 pulumi.RegisterOutputType(APIServiceListOutput{}) 253 pulumi.RegisterOutputType(APIServiceListArrayOutput{}) 254 pulumi.RegisterOutputType(APIServiceListMapOutput{}) 255 }