github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/rbac/v1/roleList.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  // RoleList is a collection of Roles
    16  type RoleList 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 a list of Roles
    22  	Items RoleTypeArrayOutput `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 object's metadata.
    26  	Metadata metav1.ListMetaPtrOutput `pulumi:"metadata"`
    27  }
    28  
    29  // NewRoleList registers a new resource with the given unique name, arguments, and options.
    30  func NewRoleList(ctx *pulumi.Context,
    31  	name string, args *RoleListArgs, opts ...pulumi.ResourceOption) (*RoleList, 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("rbac.authorization.k8s.io/v1")
    40  	args.Kind = pulumi.StringPtr("RoleList")
    41  	var resource RoleList
    42  	err := ctx.RegisterResource("kubernetes:rbac.authorization.k8s.io/v1:RoleList", name, args, &resource, opts...)
    43  	if err != nil {
    44  		return nil, err
    45  	}
    46  	return &resource, nil
    47  }
    48  
    49  // GetRoleList gets an existing RoleList resource's state with the given name, ID, and optional
    50  // state properties that are used to uniquely qualify the lookup (nil if not required).
    51  func GetRoleList(ctx *pulumi.Context,
    52  	name string, id pulumi.IDInput, state *RoleListState, opts ...pulumi.ResourceOption) (*RoleList, error) {
    53  	var resource RoleList
    54  	err := ctx.ReadResource("kubernetes:rbac.authorization.k8s.io/v1:RoleList", name, id, state, &resource, opts...)
    55  	if err != nil {
    56  		return nil, err
    57  	}
    58  	return &resource, nil
    59  }
    60  
    61  // Input properties used for looking up and filtering RoleList resources.
    62  type roleListState struct {
    63  }
    64  
    65  type RoleListState struct {
    66  }
    67  
    68  func (RoleListState) ElementType() reflect.Type {
    69  	return reflect.TypeOf((*roleListState)(nil)).Elem()
    70  }
    71  
    72  type roleListArgs struct {
    73  	// 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
    74  	ApiVersion *string `pulumi:"apiVersion"`
    75  	// Items is a list of Roles
    76  	Items []RoleType `pulumi:"items"`
    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's metadata.
    80  	Metadata *metav1.ListMeta `pulumi:"metadata"`
    81  }
    82  
    83  // The set of arguments for constructing a RoleList resource.
    84  type RoleListArgs struct {
    85  	// 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
    86  	ApiVersion pulumi.StringPtrInput
    87  	// Items is a list of Roles
    88  	Items RoleTypeArrayInput
    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's metadata.
    92  	Metadata metav1.ListMetaPtrInput
    93  }
    94  
    95  func (RoleListArgs) ElementType() reflect.Type {
    96  	return reflect.TypeOf((*roleListArgs)(nil)).Elem()
    97  }
    98  
    99  type RoleListInput interface {
   100  	pulumi.Input
   101  
   102  	ToRoleListOutput() RoleListOutput
   103  	ToRoleListOutputWithContext(ctx context.Context) RoleListOutput
   104  }
   105  
   106  func (*RoleList) ElementType() reflect.Type {
   107  	return reflect.TypeOf((**RoleList)(nil)).Elem()
   108  }
   109  
   110  func (i *RoleList) ToRoleListOutput() RoleListOutput {
   111  	return i.ToRoleListOutputWithContext(context.Background())
   112  }
   113  
   114  func (i *RoleList) ToRoleListOutputWithContext(ctx context.Context) RoleListOutput {
   115  	return pulumi.ToOutputWithContext(ctx, i).(RoleListOutput)
   116  }
   117  
   118  // RoleListArrayInput is an input type that accepts RoleListArray and RoleListArrayOutput values.
   119  // You can construct a concrete instance of `RoleListArrayInput` via:
   120  //
   121  //	RoleListArray{ RoleListArgs{...} }
   122  type RoleListArrayInput interface {
   123  	pulumi.Input
   124  
   125  	ToRoleListArrayOutput() RoleListArrayOutput
   126  	ToRoleListArrayOutputWithContext(context.Context) RoleListArrayOutput
   127  }
   128  
   129  type RoleListArray []RoleListInput
   130  
   131  func (RoleListArray) ElementType() reflect.Type {
   132  	return reflect.TypeOf((*[]*RoleList)(nil)).Elem()
   133  }
   134  
   135  func (i RoleListArray) ToRoleListArrayOutput() RoleListArrayOutput {
   136  	return i.ToRoleListArrayOutputWithContext(context.Background())
   137  }
   138  
   139  func (i RoleListArray) ToRoleListArrayOutputWithContext(ctx context.Context) RoleListArrayOutput {
   140  	return pulumi.ToOutputWithContext(ctx, i).(RoleListArrayOutput)
   141  }
   142  
   143  // RoleListMapInput is an input type that accepts RoleListMap and RoleListMapOutput values.
   144  // You can construct a concrete instance of `RoleListMapInput` via:
   145  //
   146  //	RoleListMap{ "key": RoleListArgs{...} }
   147  type RoleListMapInput interface {
   148  	pulumi.Input
   149  
   150  	ToRoleListMapOutput() RoleListMapOutput
   151  	ToRoleListMapOutputWithContext(context.Context) RoleListMapOutput
   152  }
   153  
   154  type RoleListMap map[string]RoleListInput
   155  
   156  func (RoleListMap) ElementType() reflect.Type {
   157  	return reflect.TypeOf((*map[string]*RoleList)(nil)).Elem()
   158  }
   159  
   160  func (i RoleListMap) ToRoleListMapOutput() RoleListMapOutput {
   161  	return i.ToRoleListMapOutputWithContext(context.Background())
   162  }
   163  
   164  func (i RoleListMap) ToRoleListMapOutputWithContext(ctx context.Context) RoleListMapOutput {
   165  	return pulumi.ToOutputWithContext(ctx, i).(RoleListMapOutput)
   166  }
   167  
   168  type RoleListOutput struct{ *pulumi.OutputState }
   169  
   170  func (RoleListOutput) ElementType() reflect.Type {
   171  	return reflect.TypeOf((**RoleList)(nil)).Elem()
   172  }
   173  
   174  func (o RoleListOutput) ToRoleListOutput() RoleListOutput {
   175  	return o
   176  }
   177  
   178  func (o RoleListOutput) ToRoleListOutputWithContext(ctx context.Context) RoleListOutput {
   179  	return o
   180  }
   181  
   182  // 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
   183  func (o RoleListOutput) ApiVersion() pulumi.StringPtrOutput {
   184  	return o.ApplyT(func(v *RoleList) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
   185  }
   186  
   187  // Items is a list of Roles
   188  func (o RoleListOutput) Items() RoleTypeArrayOutput {
   189  	return o.ApplyT(func(v *RoleList) RoleTypeArrayOutput { return v.Items }).(RoleTypeArrayOutput)
   190  }
   191  
   192  // 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
   193  func (o RoleListOutput) Kind() pulumi.StringPtrOutput {
   194  	return o.ApplyT(func(v *RoleList) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   195  }
   196  
   197  // Standard object's metadata.
   198  func (o RoleListOutput) Metadata() metav1.ListMetaPtrOutput {
   199  	return o.ApplyT(func(v *RoleList) metav1.ListMetaPtrOutput { return v.Metadata }).(metav1.ListMetaPtrOutput)
   200  }
   201  
   202  type RoleListArrayOutput struct{ *pulumi.OutputState }
   203  
   204  func (RoleListArrayOutput) ElementType() reflect.Type {
   205  	return reflect.TypeOf((*[]*RoleList)(nil)).Elem()
   206  }
   207  
   208  func (o RoleListArrayOutput) ToRoleListArrayOutput() RoleListArrayOutput {
   209  	return o
   210  }
   211  
   212  func (o RoleListArrayOutput) ToRoleListArrayOutputWithContext(ctx context.Context) RoleListArrayOutput {
   213  	return o
   214  }
   215  
   216  func (o RoleListArrayOutput) Index(i pulumi.IntInput) RoleListOutput {
   217  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *RoleList {
   218  		return vs[0].([]*RoleList)[vs[1].(int)]
   219  	}).(RoleListOutput)
   220  }
   221  
   222  type RoleListMapOutput struct{ *pulumi.OutputState }
   223  
   224  func (RoleListMapOutput) ElementType() reflect.Type {
   225  	return reflect.TypeOf((*map[string]*RoleList)(nil)).Elem()
   226  }
   227  
   228  func (o RoleListMapOutput) ToRoleListMapOutput() RoleListMapOutput {
   229  	return o
   230  }
   231  
   232  func (o RoleListMapOutput) ToRoleListMapOutputWithContext(ctx context.Context) RoleListMapOutput {
   233  	return o
   234  }
   235  
   236  func (o RoleListMapOutput) MapIndex(k pulumi.StringInput) RoleListOutput {
   237  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *RoleList {
   238  		return vs[0].(map[string]*RoleList)[vs[1].(string)]
   239  	}).(RoleListOutput)
   240  }
   241  
   242  func init() {
   243  	pulumi.RegisterInputType(reflect.TypeOf((*RoleListInput)(nil)).Elem(), &RoleList{})
   244  	pulumi.RegisterInputType(reflect.TypeOf((*RoleListArrayInput)(nil)).Elem(), RoleListArray{})
   245  	pulumi.RegisterInputType(reflect.TypeOf((*RoleListMapInput)(nil)).Elem(), RoleListMap{})
   246  	pulumi.RegisterOutputType(RoleListOutput{})
   247  	pulumi.RegisterOutputType(RoleListArrayOutput{})
   248  	pulumi.RegisterOutputType(RoleListMapOutput{})
   249  }