github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/apps/v1beta2/statefulSetList.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 v1beta2
     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  // StatefulSetList is a collection of StatefulSets.
    16  type StatefulSetList 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      StatefulSetTypeArrayOutput `pulumi:"items"`
    22  	// 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
    23  	Kind     pulumi.StringPtrOutput   `pulumi:"kind"`
    24  	Metadata metav1.ListMetaPtrOutput `pulumi:"metadata"`
    25  }
    26  
    27  // NewStatefulSetList registers a new resource with the given unique name, arguments, and options.
    28  func NewStatefulSetList(ctx *pulumi.Context,
    29  	name string, args *StatefulSetListArgs, opts ...pulumi.ResourceOption) (*StatefulSetList, error) {
    30  	if args == nil {
    31  		return nil, errors.New("missing one or more required arguments")
    32  	}
    33  
    34  	if args.Items == nil {
    35  		return nil, errors.New("invalid value for required argument 'Items'")
    36  	}
    37  	args.ApiVersion = pulumi.StringPtr("apps/v1beta2")
    38  	args.Kind = pulumi.StringPtr("StatefulSetList")
    39  	var resource StatefulSetList
    40  	err := ctx.RegisterResource("kubernetes:apps/v1beta2:StatefulSetList", name, args, &resource, opts...)
    41  	if err != nil {
    42  		return nil, err
    43  	}
    44  	return &resource, nil
    45  }
    46  
    47  // GetStatefulSetList gets an existing StatefulSetList resource's state with the given name, ID, and optional
    48  // state properties that are used to uniquely qualify the lookup (nil if not required).
    49  func GetStatefulSetList(ctx *pulumi.Context,
    50  	name string, id pulumi.IDInput, state *StatefulSetListState, opts ...pulumi.ResourceOption) (*StatefulSetList, error) {
    51  	var resource StatefulSetList
    52  	err := ctx.ReadResource("kubernetes:apps/v1beta2:StatefulSetList", name, id, state, &resource, opts...)
    53  	if err != nil {
    54  		return nil, err
    55  	}
    56  	return &resource, nil
    57  }
    58  
    59  // Input properties used for looking up and filtering StatefulSetList resources.
    60  type statefulSetListState struct {
    61  }
    62  
    63  type StatefulSetListState struct {
    64  }
    65  
    66  func (StatefulSetListState) ElementType() reflect.Type {
    67  	return reflect.TypeOf((*statefulSetListState)(nil)).Elem()
    68  }
    69  
    70  type statefulSetListArgs struct {
    71  	// 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
    72  	ApiVersion *string           `pulumi:"apiVersion"`
    73  	Items      []StatefulSetType `pulumi:"items"`
    74  	// 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
    75  	Kind     *string          `pulumi:"kind"`
    76  	Metadata *metav1.ListMeta `pulumi:"metadata"`
    77  }
    78  
    79  // The set of arguments for constructing a StatefulSetList resource.
    80  type StatefulSetListArgs struct {
    81  	// 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
    82  	ApiVersion pulumi.StringPtrInput
    83  	Items      StatefulSetTypeArrayInput
    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     pulumi.StringPtrInput
    86  	Metadata metav1.ListMetaPtrInput
    87  }
    88  
    89  func (StatefulSetListArgs) ElementType() reflect.Type {
    90  	return reflect.TypeOf((*statefulSetListArgs)(nil)).Elem()
    91  }
    92  
    93  type StatefulSetListInput interface {
    94  	pulumi.Input
    95  
    96  	ToStatefulSetListOutput() StatefulSetListOutput
    97  	ToStatefulSetListOutputWithContext(ctx context.Context) StatefulSetListOutput
    98  }
    99  
   100  func (*StatefulSetList) ElementType() reflect.Type {
   101  	return reflect.TypeOf((**StatefulSetList)(nil)).Elem()
   102  }
   103  
   104  func (i *StatefulSetList) ToStatefulSetListOutput() StatefulSetListOutput {
   105  	return i.ToStatefulSetListOutputWithContext(context.Background())
   106  }
   107  
   108  func (i *StatefulSetList) ToStatefulSetListOutputWithContext(ctx context.Context) StatefulSetListOutput {
   109  	return pulumi.ToOutputWithContext(ctx, i).(StatefulSetListOutput)
   110  }
   111  
   112  // StatefulSetListArrayInput is an input type that accepts StatefulSetListArray and StatefulSetListArrayOutput values.
   113  // You can construct a concrete instance of `StatefulSetListArrayInput` via:
   114  //
   115  //	StatefulSetListArray{ StatefulSetListArgs{...} }
   116  type StatefulSetListArrayInput interface {
   117  	pulumi.Input
   118  
   119  	ToStatefulSetListArrayOutput() StatefulSetListArrayOutput
   120  	ToStatefulSetListArrayOutputWithContext(context.Context) StatefulSetListArrayOutput
   121  }
   122  
   123  type StatefulSetListArray []StatefulSetListInput
   124  
   125  func (StatefulSetListArray) ElementType() reflect.Type {
   126  	return reflect.TypeOf((*[]*StatefulSetList)(nil)).Elem()
   127  }
   128  
   129  func (i StatefulSetListArray) ToStatefulSetListArrayOutput() StatefulSetListArrayOutput {
   130  	return i.ToStatefulSetListArrayOutputWithContext(context.Background())
   131  }
   132  
   133  func (i StatefulSetListArray) ToStatefulSetListArrayOutputWithContext(ctx context.Context) StatefulSetListArrayOutput {
   134  	return pulumi.ToOutputWithContext(ctx, i).(StatefulSetListArrayOutput)
   135  }
   136  
   137  // StatefulSetListMapInput is an input type that accepts StatefulSetListMap and StatefulSetListMapOutput values.
   138  // You can construct a concrete instance of `StatefulSetListMapInput` via:
   139  //
   140  //	StatefulSetListMap{ "key": StatefulSetListArgs{...} }
   141  type StatefulSetListMapInput interface {
   142  	pulumi.Input
   143  
   144  	ToStatefulSetListMapOutput() StatefulSetListMapOutput
   145  	ToStatefulSetListMapOutputWithContext(context.Context) StatefulSetListMapOutput
   146  }
   147  
   148  type StatefulSetListMap map[string]StatefulSetListInput
   149  
   150  func (StatefulSetListMap) ElementType() reflect.Type {
   151  	return reflect.TypeOf((*map[string]*StatefulSetList)(nil)).Elem()
   152  }
   153  
   154  func (i StatefulSetListMap) ToStatefulSetListMapOutput() StatefulSetListMapOutput {
   155  	return i.ToStatefulSetListMapOutputWithContext(context.Background())
   156  }
   157  
   158  func (i StatefulSetListMap) ToStatefulSetListMapOutputWithContext(ctx context.Context) StatefulSetListMapOutput {
   159  	return pulumi.ToOutputWithContext(ctx, i).(StatefulSetListMapOutput)
   160  }
   161  
   162  type StatefulSetListOutput struct{ *pulumi.OutputState }
   163  
   164  func (StatefulSetListOutput) ElementType() reflect.Type {
   165  	return reflect.TypeOf((**StatefulSetList)(nil)).Elem()
   166  }
   167  
   168  func (o StatefulSetListOutput) ToStatefulSetListOutput() StatefulSetListOutput {
   169  	return o
   170  }
   171  
   172  func (o StatefulSetListOutput) ToStatefulSetListOutputWithContext(ctx context.Context) StatefulSetListOutput {
   173  	return o
   174  }
   175  
   176  // 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
   177  func (o StatefulSetListOutput) ApiVersion() pulumi.StringPtrOutput {
   178  	return o.ApplyT(func(v *StatefulSetList) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
   179  }
   180  
   181  func (o StatefulSetListOutput) Items() StatefulSetTypeArrayOutput {
   182  	return o.ApplyT(func(v *StatefulSetList) StatefulSetTypeArrayOutput { return v.Items }).(StatefulSetTypeArrayOutput)
   183  }
   184  
   185  // 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
   186  func (o StatefulSetListOutput) Kind() pulumi.StringPtrOutput {
   187  	return o.ApplyT(func(v *StatefulSetList) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   188  }
   189  
   190  func (o StatefulSetListOutput) Metadata() metav1.ListMetaPtrOutput {
   191  	return o.ApplyT(func(v *StatefulSetList) metav1.ListMetaPtrOutput { return v.Metadata }).(metav1.ListMetaPtrOutput)
   192  }
   193  
   194  type StatefulSetListArrayOutput struct{ *pulumi.OutputState }
   195  
   196  func (StatefulSetListArrayOutput) ElementType() reflect.Type {
   197  	return reflect.TypeOf((*[]*StatefulSetList)(nil)).Elem()
   198  }
   199  
   200  func (o StatefulSetListArrayOutput) ToStatefulSetListArrayOutput() StatefulSetListArrayOutput {
   201  	return o
   202  }
   203  
   204  func (o StatefulSetListArrayOutput) ToStatefulSetListArrayOutputWithContext(ctx context.Context) StatefulSetListArrayOutput {
   205  	return o
   206  }
   207  
   208  func (o StatefulSetListArrayOutput) Index(i pulumi.IntInput) StatefulSetListOutput {
   209  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StatefulSetList {
   210  		return vs[0].([]*StatefulSetList)[vs[1].(int)]
   211  	}).(StatefulSetListOutput)
   212  }
   213  
   214  type StatefulSetListMapOutput struct{ *pulumi.OutputState }
   215  
   216  func (StatefulSetListMapOutput) ElementType() reflect.Type {
   217  	return reflect.TypeOf((*map[string]*StatefulSetList)(nil)).Elem()
   218  }
   219  
   220  func (o StatefulSetListMapOutput) ToStatefulSetListMapOutput() StatefulSetListMapOutput {
   221  	return o
   222  }
   223  
   224  func (o StatefulSetListMapOutput) ToStatefulSetListMapOutputWithContext(ctx context.Context) StatefulSetListMapOutput {
   225  	return o
   226  }
   227  
   228  func (o StatefulSetListMapOutput) MapIndex(k pulumi.StringInput) StatefulSetListOutput {
   229  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StatefulSetList {
   230  		return vs[0].(map[string]*StatefulSetList)[vs[1].(string)]
   231  	}).(StatefulSetListOutput)
   232  }
   233  
   234  func init() {
   235  	pulumi.RegisterInputType(reflect.TypeOf((*StatefulSetListInput)(nil)).Elem(), &StatefulSetList{})
   236  	pulumi.RegisterInputType(reflect.TypeOf((*StatefulSetListArrayInput)(nil)).Elem(), StatefulSetListArray{})
   237  	pulumi.RegisterInputType(reflect.TypeOf((*StatefulSetListMapInput)(nil)).Elem(), StatefulSetListMap{})
   238  	pulumi.RegisterOutputType(StatefulSetListOutput{})
   239  	pulumi.RegisterOutputType(StatefulSetListArrayOutput{})
   240  	pulumi.RegisterOutputType(StatefulSetListMapOutput{})
   241  }