github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/core/v1/replicationController.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  // ReplicationController represents the configuration of a replication controller.
    15  type ReplicationController 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  	// If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. 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 defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    25  	Spec ReplicationControllerSpecPtrOutput `pulumi:"spec"`
    26  	// Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    27  	Status ReplicationControllerStatusPtrOutput `pulumi:"status"`
    28  }
    29  
    30  // NewReplicationController registers a new resource with the given unique name, arguments, and options.
    31  func NewReplicationController(ctx *pulumi.Context,
    32  	name string, args *ReplicationControllerArgs, opts ...pulumi.ResourceOption) (*ReplicationController, error) {
    33  	if args == nil {
    34  		args = &ReplicationControllerArgs{}
    35  	}
    36  
    37  	args.ApiVersion = pulumi.StringPtr("v1")
    38  	args.Kind = pulumi.StringPtr("ReplicationController")
    39  	var resource ReplicationController
    40  	err := ctx.RegisterResource("kubernetes:core/v1:ReplicationController", name, args, &resource, opts...)
    41  	if err != nil {
    42  		return nil, err
    43  	}
    44  	return &resource, nil
    45  }
    46  
    47  // GetReplicationController gets an existing ReplicationController 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 GetReplicationController(ctx *pulumi.Context,
    50  	name string, id pulumi.IDInput, state *ReplicationControllerState, opts ...pulumi.ResourceOption) (*ReplicationController, error) {
    51  	var resource ReplicationController
    52  	err := ctx.ReadResource("kubernetes:core/v1:ReplicationController", 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 ReplicationController resources.
    60  type replicationControllerState struct {
    61  }
    62  
    63  type ReplicationControllerState struct {
    64  }
    65  
    66  func (ReplicationControllerState) ElementType() reflect.Type {
    67  	return reflect.TypeOf((*replicationControllerState)(nil)).Elem()
    68  }
    69  
    70  type replicationControllerArgs 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  	// 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
    74  	Kind *string `pulumi:"kind"`
    75  	// If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    76  	Metadata *metav1.ObjectMeta `pulumi:"metadata"`
    77  	// Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    78  	Spec *ReplicationControllerSpec `pulumi:"spec"`
    79  }
    80  
    81  // The set of arguments for constructing a ReplicationController resource.
    82  type ReplicationControllerArgs 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 pulumi.StringPtrInput
    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 pulumi.StringPtrInput
    87  	// If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    88  	Metadata metav1.ObjectMetaPtrInput
    89  	// Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    90  	Spec ReplicationControllerSpecPtrInput
    91  }
    92  
    93  func (ReplicationControllerArgs) ElementType() reflect.Type {
    94  	return reflect.TypeOf((*replicationControllerArgs)(nil)).Elem()
    95  }
    96  
    97  type ReplicationControllerInput interface {
    98  	pulumi.Input
    99  
   100  	ToReplicationControllerOutput() ReplicationControllerOutput
   101  	ToReplicationControllerOutputWithContext(ctx context.Context) ReplicationControllerOutput
   102  }
   103  
   104  func (*ReplicationController) ElementType() reflect.Type {
   105  	return reflect.TypeOf((**ReplicationController)(nil)).Elem()
   106  }
   107  
   108  func (i *ReplicationController) ToReplicationControllerOutput() ReplicationControllerOutput {
   109  	return i.ToReplicationControllerOutputWithContext(context.Background())
   110  }
   111  
   112  func (i *ReplicationController) ToReplicationControllerOutputWithContext(ctx context.Context) ReplicationControllerOutput {
   113  	return pulumi.ToOutputWithContext(ctx, i).(ReplicationControllerOutput)
   114  }
   115  
   116  // ReplicationControllerArrayInput is an input type that accepts ReplicationControllerArray and ReplicationControllerArrayOutput values.
   117  // You can construct a concrete instance of `ReplicationControllerArrayInput` via:
   118  //
   119  //	ReplicationControllerArray{ ReplicationControllerArgs{...} }
   120  type ReplicationControllerArrayInput interface {
   121  	pulumi.Input
   122  
   123  	ToReplicationControllerArrayOutput() ReplicationControllerArrayOutput
   124  	ToReplicationControllerArrayOutputWithContext(context.Context) ReplicationControllerArrayOutput
   125  }
   126  
   127  type ReplicationControllerArray []ReplicationControllerInput
   128  
   129  func (ReplicationControllerArray) ElementType() reflect.Type {
   130  	return reflect.TypeOf((*[]*ReplicationController)(nil)).Elem()
   131  }
   132  
   133  func (i ReplicationControllerArray) ToReplicationControllerArrayOutput() ReplicationControllerArrayOutput {
   134  	return i.ToReplicationControllerArrayOutputWithContext(context.Background())
   135  }
   136  
   137  func (i ReplicationControllerArray) ToReplicationControllerArrayOutputWithContext(ctx context.Context) ReplicationControllerArrayOutput {
   138  	return pulumi.ToOutputWithContext(ctx, i).(ReplicationControllerArrayOutput)
   139  }
   140  
   141  // ReplicationControllerMapInput is an input type that accepts ReplicationControllerMap and ReplicationControllerMapOutput values.
   142  // You can construct a concrete instance of `ReplicationControllerMapInput` via:
   143  //
   144  //	ReplicationControllerMap{ "key": ReplicationControllerArgs{...} }
   145  type ReplicationControllerMapInput interface {
   146  	pulumi.Input
   147  
   148  	ToReplicationControllerMapOutput() ReplicationControllerMapOutput
   149  	ToReplicationControllerMapOutputWithContext(context.Context) ReplicationControllerMapOutput
   150  }
   151  
   152  type ReplicationControllerMap map[string]ReplicationControllerInput
   153  
   154  func (ReplicationControllerMap) ElementType() reflect.Type {
   155  	return reflect.TypeOf((*map[string]*ReplicationController)(nil)).Elem()
   156  }
   157  
   158  func (i ReplicationControllerMap) ToReplicationControllerMapOutput() ReplicationControllerMapOutput {
   159  	return i.ToReplicationControllerMapOutputWithContext(context.Background())
   160  }
   161  
   162  func (i ReplicationControllerMap) ToReplicationControllerMapOutputWithContext(ctx context.Context) ReplicationControllerMapOutput {
   163  	return pulumi.ToOutputWithContext(ctx, i).(ReplicationControllerMapOutput)
   164  }
   165  
   166  type ReplicationControllerOutput struct{ *pulumi.OutputState }
   167  
   168  func (ReplicationControllerOutput) ElementType() reflect.Type {
   169  	return reflect.TypeOf((**ReplicationController)(nil)).Elem()
   170  }
   171  
   172  func (o ReplicationControllerOutput) ToReplicationControllerOutput() ReplicationControllerOutput {
   173  	return o
   174  }
   175  
   176  func (o ReplicationControllerOutput) ToReplicationControllerOutputWithContext(ctx context.Context) ReplicationControllerOutput {
   177  	return o
   178  }
   179  
   180  // 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
   181  func (o ReplicationControllerOutput) ApiVersion() pulumi.StringPtrOutput {
   182  	return o.ApplyT(func(v *ReplicationController) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
   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 ReplicationControllerOutput) Kind() pulumi.StringPtrOutput {
   187  	return o.ApplyT(func(v *ReplicationController) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   188  }
   189  
   190  // If the Labels of a ReplicationController are empty, they are defaulted to be the same as the Pod(s) that the replication controller manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
   191  func (o ReplicationControllerOutput) Metadata() metav1.ObjectMetaPtrOutput {
   192  	return o.ApplyT(func(v *ReplicationController) metav1.ObjectMetaPtrOutput { return v.Metadata }).(metav1.ObjectMetaPtrOutput)
   193  }
   194  
   195  // Spec defines the specification of the desired behavior of the replication controller. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
   196  func (o ReplicationControllerOutput) Spec() ReplicationControllerSpecPtrOutput {
   197  	return o.ApplyT(func(v *ReplicationController) ReplicationControllerSpecPtrOutput { return v.Spec }).(ReplicationControllerSpecPtrOutput)
   198  }
   199  
   200  // Status is the most recently observed status of the replication controller. This data may be out of date by some window of time. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
   201  func (o ReplicationControllerOutput) Status() ReplicationControllerStatusPtrOutput {
   202  	return o.ApplyT(func(v *ReplicationController) ReplicationControllerStatusPtrOutput { return v.Status }).(ReplicationControllerStatusPtrOutput)
   203  }
   204  
   205  type ReplicationControllerArrayOutput struct{ *pulumi.OutputState }
   206  
   207  func (ReplicationControllerArrayOutput) ElementType() reflect.Type {
   208  	return reflect.TypeOf((*[]*ReplicationController)(nil)).Elem()
   209  }
   210  
   211  func (o ReplicationControllerArrayOutput) ToReplicationControllerArrayOutput() ReplicationControllerArrayOutput {
   212  	return o
   213  }
   214  
   215  func (o ReplicationControllerArrayOutput) ToReplicationControllerArrayOutputWithContext(ctx context.Context) ReplicationControllerArrayOutput {
   216  	return o
   217  }
   218  
   219  func (o ReplicationControllerArrayOutput) Index(i pulumi.IntInput) ReplicationControllerOutput {
   220  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ReplicationController {
   221  		return vs[0].([]*ReplicationController)[vs[1].(int)]
   222  	}).(ReplicationControllerOutput)
   223  }
   224  
   225  type ReplicationControllerMapOutput struct{ *pulumi.OutputState }
   226  
   227  func (ReplicationControllerMapOutput) ElementType() reflect.Type {
   228  	return reflect.TypeOf((*map[string]*ReplicationController)(nil)).Elem()
   229  }
   230  
   231  func (o ReplicationControllerMapOutput) ToReplicationControllerMapOutput() ReplicationControllerMapOutput {
   232  	return o
   233  }
   234  
   235  func (o ReplicationControllerMapOutput) ToReplicationControllerMapOutputWithContext(ctx context.Context) ReplicationControllerMapOutput {
   236  	return o
   237  }
   238  
   239  func (o ReplicationControllerMapOutput) MapIndex(k pulumi.StringInput) ReplicationControllerOutput {
   240  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ReplicationController {
   241  		return vs[0].(map[string]*ReplicationController)[vs[1].(string)]
   242  	}).(ReplicationControllerOutput)
   243  }
   244  
   245  func init() {
   246  	pulumi.RegisterInputType(reflect.TypeOf((*ReplicationControllerInput)(nil)).Elem(), &ReplicationController{})
   247  	pulumi.RegisterInputType(reflect.TypeOf((*ReplicationControllerArrayInput)(nil)).Elem(), ReplicationControllerArray{})
   248  	pulumi.RegisterInputType(reflect.TypeOf((*ReplicationControllerMapInput)(nil)).Elem(), ReplicationControllerMap{})
   249  	pulumi.RegisterOutputType(ReplicationControllerOutput{})
   250  	pulumi.RegisterOutputType(ReplicationControllerArrayOutput{})
   251  	pulumi.RegisterOutputType(ReplicationControllerMapOutput{})
   252  }