github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/extensions/v1beta1/replicaSetPatch.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 v1beta1
     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  // Patch resources are used to modify existing Kubernetes resources by using
    15  // Server-Side Apply updates. The name of the resource must be specified, but all other properties are optional. More than
    16  // one patch may be applied to the same resource, and a random FieldManager name will be used for each Patch resource.
    17  // Conflicts will result in an error by default, but can be forced using the "pulumi.com/patchForce" annotation. See the
    18  // [Server-Side Apply Docs](https://www.pulumi.com/registry/packages/kubernetes/how-to-guides/managing-resources-with-server-side-apply/) for
    19  // additional information about using Server-Side Apply to manage Kubernetes resources with Pulumi.
    20  // ReplicaSet ensures that a specified number of pod replicas are running at any given time.
    21  //
    22  // Deprecated: extensions/v1beta1/ReplicaSet is deprecated by apps/v1/ReplicaSet and not supported by Kubernetes v1.16+ clusters.
    23  type ReplicaSetPatch struct {
    24  	pulumi.CustomResourceState
    25  
    26  	// 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
    27  	ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"`
    28  	// 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
    29  	Kind pulumi.StringPtrOutput `pulumi:"kind"`
    30  	// If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    31  	Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"`
    32  	// Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    33  	Spec ReplicaSetSpecPatchPtrOutput `pulumi:"spec"`
    34  	// Status is the most recently observed status of the ReplicaSet. 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
    35  	Status ReplicaSetStatusPatchPtrOutput `pulumi:"status"`
    36  }
    37  
    38  // NewReplicaSetPatch registers a new resource with the given unique name, arguments, and options.
    39  func NewReplicaSetPatch(ctx *pulumi.Context,
    40  	name string, args *ReplicaSetPatchArgs, opts ...pulumi.ResourceOption) (*ReplicaSetPatch, error) {
    41  	if args == nil {
    42  		args = &ReplicaSetPatchArgs{}
    43  	}
    44  
    45  	args.ApiVersion = pulumi.StringPtr("extensions/v1beta1")
    46  	args.Kind = pulumi.StringPtr("ReplicaSet")
    47  	aliases := pulumi.Aliases([]pulumi.Alias{
    48  		{
    49  			Type: pulumi.String("kubernetes:apps/v1:ReplicaSetPatch"),
    50  		},
    51  		{
    52  			Type: pulumi.String("kubernetes:apps/v1beta2:ReplicaSetPatch"),
    53  		},
    54  	})
    55  	opts = append(opts, aliases)
    56  	var resource ReplicaSetPatch
    57  	err := ctx.RegisterResource("kubernetes:extensions/v1beta1:ReplicaSetPatch", name, args, &resource, opts...)
    58  	if err != nil {
    59  		return nil, err
    60  	}
    61  	return &resource, nil
    62  }
    63  
    64  // GetReplicaSetPatch gets an existing ReplicaSetPatch resource's state with the given name, ID, and optional
    65  // state properties that are used to uniquely qualify the lookup (nil if not required).
    66  func GetReplicaSetPatch(ctx *pulumi.Context,
    67  	name string, id pulumi.IDInput, state *ReplicaSetPatchState, opts ...pulumi.ResourceOption) (*ReplicaSetPatch, error) {
    68  	var resource ReplicaSetPatch
    69  	err := ctx.ReadResource("kubernetes:extensions/v1beta1:ReplicaSetPatch", name, id, state, &resource, opts...)
    70  	if err != nil {
    71  		return nil, err
    72  	}
    73  	return &resource, nil
    74  }
    75  
    76  // Input properties used for looking up and filtering ReplicaSetPatch resources.
    77  type replicaSetPatchState struct {
    78  }
    79  
    80  type ReplicaSetPatchState struct {
    81  }
    82  
    83  func (ReplicaSetPatchState) ElementType() reflect.Type {
    84  	return reflect.TypeOf((*replicaSetPatchState)(nil)).Elem()
    85  }
    86  
    87  type replicaSetPatchArgs struct {
    88  	// 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
    89  	ApiVersion *string `pulumi:"apiVersion"`
    90  	// 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
    91  	Kind *string `pulumi:"kind"`
    92  	// If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
    93  	Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"`
    94  	// Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
    95  	Spec *ReplicaSetSpecPatch `pulumi:"spec"`
    96  }
    97  
    98  // The set of arguments for constructing a ReplicaSetPatch resource.
    99  type ReplicaSetPatchArgs struct {
   100  	// 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
   101  	ApiVersion pulumi.StringPtrInput
   102  	// 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
   103  	Kind pulumi.StringPtrInput
   104  	// If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
   105  	Metadata metav1.ObjectMetaPatchPtrInput
   106  	// Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
   107  	Spec ReplicaSetSpecPatchPtrInput
   108  }
   109  
   110  func (ReplicaSetPatchArgs) ElementType() reflect.Type {
   111  	return reflect.TypeOf((*replicaSetPatchArgs)(nil)).Elem()
   112  }
   113  
   114  type ReplicaSetPatchInput interface {
   115  	pulumi.Input
   116  
   117  	ToReplicaSetPatchOutput() ReplicaSetPatchOutput
   118  	ToReplicaSetPatchOutputWithContext(ctx context.Context) ReplicaSetPatchOutput
   119  }
   120  
   121  func (*ReplicaSetPatch) ElementType() reflect.Type {
   122  	return reflect.TypeOf((**ReplicaSetPatch)(nil)).Elem()
   123  }
   124  
   125  func (i *ReplicaSetPatch) ToReplicaSetPatchOutput() ReplicaSetPatchOutput {
   126  	return i.ToReplicaSetPatchOutputWithContext(context.Background())
   127  }
   128  
   129  func (i *ReplicaSetPatch) ToReplicaSetPatchOutputWithContext(ctx context.Context) ReplicaSetPatchOutput {
   130  	return pulumi.ToOutputWithContext(ctx, i).(ReplicaSetPatchOutput)
   131  }
   132  
   133  // ReplicaSetPatchArrayInput is an input type that accepts ReplicaSetPatchArray and ReplicaSetPatchArrayOutput values.
   134  // You can construct a concrete instance of `ReplicaSetPatchArrayInput` via:
   135  //
   136  //	ReplicaSetPatchArray{ ReplicaSetPatchArgs{...} }
   137  type ReplicaSetPatchArrayInput interface {
   138  	pulumi.Input
   139  
   140  	ToReplicaSetPatchArrayOutput() ReplicaSetPatchArrayOutput
   141  	ToReplicaSetPatchArrayOutputWithContext(context.Context) ReplicaSetPatchArrayOutput
   142  }
   143  
   144  type ReplicaSetPatchArray []ReplicaSetPatchInput
   145  
   146  func (ReplicaSetPatchArray) ElementType() reflect.Type {
   147  	return reflect.TypeOf((*[]*ReplicaSetPatch)(nil)).Elem()
   148  }
   149  
   150  func (i ReplicaSetPatchArray) ToReplicaSetPatchArrayOutput() ReplicaSetPatchArrayOutput {
   151  	return i.ToReplicaSetPatchArrayOutputWithContext(context.Background())
   152  }
   153  
   154  func (i ReplicaSetPatchArray) ToReplicaSetPatchArrayOutputWithContext(ctx context.Context) ReplicaSetPatchArrayOutput {
   155  	return pulumi.ToOutputWithContext(ctx, i).(ReplicaSetPatchArrayOutput)
   156  }
   157  
   158  // ReplicaSetPatchMapInput is an input type that accepts ReplicaSetPatchMap and ReplicaSetPatchMapOutput values.
   159  // You can construct a concrete instance of `ReplicaSetPatchMapInput` via:
   160  //
   161  //	ReplicaSetPatchMap{ "key": ReplicaSetPatchArgs{...} }
   162  type ReplicaSetPatchMapInput interface {
   163  	pulumi.Input
   164  
   165  	ToReplicaSetPatchMapOutput() ReplicaSetPatchMapOutput
   166  	ToReplicaSetPatchMapOutputWithContext(context.Context) ReplicaSetPatchMapOutput
   167  }
   168  
   169  type ReplicaSetPatchMap map[string]ReplicaSetPatchInput
   170  
   171  func (ReplicaSetPatchMap) ElementType() reflect.Type {
   172  	return reflect.TypeOf((*map[string]*ReplicaSetPatch)(nil)).Elem()
   173  }
   174  
   175  func (i ReplicaSetPatchMap) ToReplicaSetPatchMapOutput() ReplicaSetPatchMapOutput {
   176  	return i.ToReplicaSetPatchMapOutputWithContext(context.Background())
   177  }
   178  
   179  func (i ReplicaSetPatchMap) ToReplicaSetPatchMapOutputWithContext(ctx context.Context) ReplicaSetPatchMapOutput {
   180  	return pulumi.ToOutputWithContext(ctx, i).(ReplicaSetPatchMapOutput)
   181  }
   182  
   183  type ReplicaSetPatchOutput struct{ *pulumi.OutputState }
   184  
   185  func (ReplicaSetPatchOutput) ElementType() reflect.Type {
   186  	return reflect.TypeOf((**ReplicaSetPatch)(nil)).Elem()
   187  }
   188  
   189  func (o ReplicaSetPatchOutput) ToReplicaSetPatchOutput() ReplicaSetPatchOutput {
   190  	return o
   191  }
   192  
   193  func (o ReplicaSetPatchOutput) ToReplicaSetPatchOutputWithContext(ctx context.Context) ReplicaSetPatchOutput {
   194  	return o
   195  }
   196  
   197  // 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
   198  func (o ReplicaSetPatchOutput) ApiVersion() pulumi.StringPtrOutput {
   199  	return o.ApplyT(func(v *ReplicaSetPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput)
   200  }
   201  
   202  // 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
   203  func (o ReplicaSetPatchOutput) Kind() pulumi.StringPtrOutput {
   204  	return o.ApplyT(func(v *ReplicaSetPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput)
   205  }
   206  
   207  // If the Labels of a ReplicaSet are empty, they are defaulted to be the same as the Pod(s) that the ReplicaSet manages. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
   208  func (o ReplicaSetPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput {
   209  	return o.ApplyT(func(v *ReplicaSetPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput)
   210  }
   211  
   212  // Spec defines the specification of the desired behavior of the ReplicaSet. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
   213  func (o ReplicaSetPatchOutput) Spec() ReplicaSetSpecPatchPtrOutput {
   214  	return o.ApplyT(func(v *ReplicaSetPatch) ReplicaSetSpecPatchPtrOutput { return v.Spec }).(ReplicaSetSpecPatchPtrOutput)
   215  }
   216  
   217  // Status is the most recently observed status of the ReplicaSet. 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
   218  func (o ReplicaSetPatchOutput) Status() ReplicaSetStatusPatchPtrOutput {
   219  	return o.ApplyT(func(v *ReplicaSetPatch) ReplicaSetStatusPatchPtrOutput { return v.Status }).(ReplicaSetStatusPatchPtrOutput)
   220  }
   221  
   222  type ReplicaSetPatchArrayOutput struct{ *pulumi.OutputState }
   223  
   224  func (ReplicaSetPatchArrayOutput) ElementType() reflect.Type {
   225  	return reflect.TypeOf((*[]*ReplicaSetPatch)(nil)).Elem()
   226  }
   227  
   228  func (o ReplicaSetPatchArrayOutput) ToReplicaSetPatchArrayOutput() ReplicaSetPatchArrayOutput {
   229  	return o
   230  }
   231  
   232  func (o ReplicaSetPatchArrayOutput) ToReplicaSetPatchArrayOutputWithContext(ctx context.Context) ReplicaSetPatchArrayOutput {
   233  	return o
   234  }
   235  
   236  func (o ReplicaSetPatchArrayOutput) Index(i pulumi.IntInput) ReplicaSetPatchOutput {
   237  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ReplicaSetPatch {
   238  		return vs[0].([]*ReplicaSetPatch)[vs[1].(int)]
   239  	}).(ReplicaSetPatchOutput)
   240  }
   241  
   242  type ReplicaSetPatchMapOutput struct{ *pulumi.OutputState }
   243  
   244  func (ReplicaSetPatchMapOutput) ElementType() reflect.Type {
   245  	return reflect.TypeOf((*map[string]*ReplicaSetPatch)(nil)).Elem()
   246  }
   247  
   248  func (o ReplicaSetPatchMapOutput) ToReplicaSetPatchMapOutput() ReplicaSetPatchMapOutput {
   249  	return o
   250  }
   251  
   252  func (o ReplicaSetPatchMapOutput) ToReplicaSetPatchMapOutputWithContext(ctx context.Context) ReplicaSetPatchMapOutput {
   253  	return o
   254  }
   255  
   256  func (o ReplicaSetPatchMapOutput) MapIndex(k pulumi.StringInput) ReplicaSetPatchOutput {
   257  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ReplicaSetPatch {
   258  		return vs[0].(map[string]*ReplicaSetPatch)[vs[1].(string)]
   259  	}).(ReplicaSetPatchOutput)
   260  }
   261  
   262  func init() {
   263  	pulumi.RegisterInputType(reflect.TypeOf((*ReplicaSetPatchInput)(nil)).Elem(), &ReplicaSetPatch{})
   264  	pulumi.RegisterInputType(reflect.TypeOf((*ReplicaSetPatchArrayInput)(nil)).Elem(), ReplicaSetPatchArray{})
   265  	pulumi.RegisterInputType(reflect.TypeOf((*ReplicaSetPatchMapInput)(nil)).Elem(), ReplicaSetPatchMap{})
   266  	pulumi.RegisterOutputType(ReplicaSetPatchOutput{})
   267  	pulumi.RegisterOutputType(ReplicaSetPatchArrayOutput{})
   268  	pulumi.RegisterOutputType(ReplicaSetPatchMapOutput{})
   269  }