github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/core/v1/replicationControllerPatch.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 // 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 // ReplicationController represents the configuration of a replication controller. 21 type ReplicationControllerPatch struct { 22 pulumi.CustomResourceState 23 24 // 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 25 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 26 // 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 27 Kind pulumi.StringPtrOutput `pulumi:"kind"` 28 // 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 29 Metadata metav1.ObjectMetaPatchPtrOutput `pulumi:"metadata"` 30 // 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 31 Spec ReplicationControllerSpecPatchPtrOutput `pulumi:"spec"` 32 // 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 33 Status ReplicationControllerStatusPatchPtrOutput `pulumi:"status"` 34 } 35 36 // NewReplicationControllerPatch registers a new resource with the given unique name, arguments, and options. 37 func NewReplicationControllerPatch(ctx *pulumi.Context, 38 name string, args *ReplicationControllerPatchArgs, opts ...pulumi.ResourceOption) (*ReplicationControllerPatch, error) { 39 if args == nil { 40 args = &ReplicationControllerPatchArgs{} 41 } 42 43 args.ApiVersion = pulumi.StringPtr("v1") 44 args.Kind = pulumi.StringPtr("ReplicationController") 45 var resource ReplicationControllerPatch 46 err := ctx.RegisterResource("kubernetes:core/v1:ReplicationControllerPatch", name, args, &resource, opts...) 47 if err != nil { 48 return nil, err 49 } 50 return &resource, nil 51 } 52 53 // GetReplicationControllerPatch gets an existing ReplicationControllerPatch resource's state with the given name, ID, and optional 54 // state properties that are used to uniquely qualify the lookup (nil if not required). 55 func GetReplicationControllerPatch(ctx *pulumi.Context, 56 name string, id pulumi.IDInput, state *ReplicationControllerPatchState, opts ...pulumi.ResourceOption) (*ReplicationControllerPatch, error) { 57 var resource ReplicationControllerPatch 58 err := ctx.ReadResource("kubernetes:core/v1:ReplicationControllerPatch", name, id, state, &resource, opts...) 59 if err != nil { 60 return nil, err 61 } 62 return &resource, nil 63 } 64 65 // Input properties used for looking up and filtering ReplicationControllerPatch resources. 66 type replicationControllerPatchState struct { 67 } 68 69 type ReplicationControllerPatchState struct { 70 } 71 72 func (ReplicationControllerPatchState) ElementType() reflect.Type { 73 return reflect.TypeOf((*replicationControllerPatchState)(nil)).Elem() 74 } 75 76 type replicationControllerPatchArgs struct { 77 // 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 78 ApiVersion *string `pulumi:"apiVersion"` 79 // 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 80 Kind *string `pulumi:"kind"` 81 // 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 82 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 83 // 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 84 Spec *ReplicationControllerSpecPatch `pulumi:"spec"` 85 } 86 87 // The set of arguments for constructing a ReplicationControllerPatch resource. 88 type ReplicationControllerPatchArgs struct { 89 // 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 90 ApiVersion pulumi.StringPtrInput 91 // 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 92 Kind pulumi.StringPtrInput 93 // 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 94 Metadata metav1.ObjectMetaPatchPtrInput 95 // 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 96 Spec ReplicationControllerSpecPatchPtrInput 97 } 98 99 func (ReplicationControllerPatchArgs) ElementType() reflect.Type { 100 return reflect.TypeOf((*replicationControllerPatchArgs)(nil)).Elem() 101 } 102 103 type ReplicationControllerPatchInput interface { 104 pulumi.Input 105 106 ToReplicationControllerPatchOutput() ReplicationControllerPatchOutput 107 ToReplicationControllerPatchOutputWithContext(ctx context.Context) ReplicationControllerPatchOutput 108 } 109 110 func (*ReplicationControllerPatch) ElementType() reflect.Type { 111 return reflect.TypeOf((**ReplicationControllerPatch)(nil)).Elem() 112 } 113 114 func (i *ReplicationControllerPatch) ToReplicationControllerPatchOutput() ReplicationControllerPatchOutput { 115 return i.ToReplicationControllerPatchOutputWithContext(context.Background()) 116 } 117 118 func (i *ReplicationControllerPatch) ToReplicationControllerPatchOutputWithContext(ctx context.Context) ReplicationControllerPatchOutput { 119 return pulumi.ToOutputWithContext(ctx, i).(ReplicationControllerPatchOutput) 120 } 121 122 // ReplicationControllerPatchArrayInput is an input type that accepts ReplicationControllerPatchArray and ReplicationControllerPatchArrayOutput values. 123 // You can construct a concrete instance of `ReplicationControllerPatchArrayInput` via: 124 // 125 // ReplicationControllerPatchArray{ ReplicationControllerPatchArgs{...} } 126 type ReplicationControllerPatchArrayInput interface { 127 pulumi.Input 128 129 ToReplicationControllerPatchArrayOutput() ReplicationControllerPatchArrayOutput 130 ToReplicationControllerPatchArrayOutputWithContext(context.Context) ReplicationControllerPatchArrayOutput 131 } 132 133 type ReplicationControllerPatchArray []ReplicationControllerPatchInput 134 135 func (ReplicationControllerPatchArray) ElementType() reflect.Type { 136 return reflect.TypeOf((*[]*ReplicationControllerPatch)(nil)).Elem() 137 } 138 139 func (i ReplicationControllerPatchArray) ToReplicationControllerPatchArrayOutput() ReplicationControllerPatchArrayOutput { 140 return i.ToReplicationControllerPatchArrayOutputWithContext(context.Background()) 141 } 142 143 func (i ReplicationControllerPatchArray) ToReplicationControllerPatchArrayOutputWithContext(ctx context.Context) ReplicationControllerPatchArrayOutput { 144 return pulumi.ToOutputWithContext(ctx, i).(ReplicationControllerPatchArrayOutput) 145 } 146 147 // ReplicationControllerPatchMapInput is an input type that accepts ReplicationControllerPatchMap and ReplicationControllerPatchMapOutput values. 148 // You can construct a concrete instance of `ReplicationControllerPatchMapInput` via: 149 // 150 // ReplicationControllerPatchMap{ "key": ReplicationControllerPatchArgs{...} } 151 type ReplicationControllerPatchMapInput interface { 152 pulumi.Input 153 154 ToReplicationControllerPatchMapOutput() ReplicationControllerPatchMapOutput 155 ToReplicationControllerPatchMapOutputWithContext(context.Context) ReplicationControllerPatchMapOutput 156 } 157 158 type ReplicationControllerPatchMap map[string]ReplicationControllerPatchInput 159 160 func (ReplicationControllerPatchMap) ElementType() reflect.Type { 161 return reflect.TypeOf((*map[string]*ReplicationControllerPatch)(nil)).Elem() 162 } 163 164 func (i ReplicationControllerPatchMap) ToReplicationControllerPatchMapOutput() ReplicationControllerPatchMapOutput { 165 return i.ToReplicationControllerPatchMapOutputWithContext(context.Background()) 166 } 167 168 func (i ReplicationControllerPatchMap) ToReplicationControllerPatchMapOutputWithContext(ctx context.Context) ReplicationControllerPatchMapOutput { 169 return pulumi.ToOutputWithContext(ctx, i).(ReplicationControllerPatchMapOutput) 170 } 171 172 type ReplicationControllerPatchOutput struct{ *pulumi.OutputState } 173 174 func (ReplicationControllerPatchOutput) ElementType() reflect.Type { 175 return reflect.TypeOf((**ReplicationControllerPatch)(nil)).Elem() 176 } 177 178 func (o ReplicationControllerPatchOutput) ToReplicationControllerPatchOutput() ReplicationControllerPatchOutput { 179 return o 180 } 181 182 func (o ReplicationControllerPatchOutput) ToReplicationControllerPatchOutputWithContext(ctx context.Context) ReplicationControllerPatchOutput { 183 return o 184 } 185 186 // 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 187 func (o ReplicationControllerPatchOutput) ApiVersion() pulumi.StringPtrOutput { 188 return o.ApplyT(func(v *ReplicationControllerPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 189 } 190 191 // 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 192 func (o ReplicationControllerPatchOutput) Kind() pulumi.StringPtrOutput { 193 return o.ApplyT(func(v *ReplicationControllerPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 194 } 195 196 // 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 197 func (o ReplicationControllerPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 198 return o.ApplyT(func(v *ReplicationControllerPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 199 } 200 201 // 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 202 func (o ReplicationControllerPatchOutput) Spec() ReplicationControllerSpecPatchPtrOutput { 203 return o.ApplyT(func(v *ReplicationControllerPatch) ReplicationControllerSpecPatchPtrOutput { return v.Spec }).(ReplicationControllerSpecPatchPtrOutput) 204 } 205 206 // 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 207 func (o ReplicationControllerPatchOutput) Status() ReplicationControllerStatusPatchPtrOutput { 208 return o.ApplyT(func(v *ReplicationControllerPatch) ReplicationControllerStatusPatchPtrOutput { return v.Status }).(ReplicationControllerStatusPatchPtrOutput) 209 } 210 211 type ReplicationControllerPatchArrayOutput struct{ *pulumi.OutputState } 212 213 func (ReplicationControllerPatchArrayOutput) ElementType() reflect.Type { 214 return reflect.TypeOf((*[]*ReplicationControllerPatch)(nil)).Elem() 215 } 216 217 func (o ReplicationControllerPatchArrayOutput) ToReplicationControllerPatchArrayOutput() ReplicationControllerPatchArrayOutput { 218 return o 219 } 220 221 func (o ReplicationControllerPatchArrayOutput) ToReplicationControllerPatchArrayOutputWithContext(ctx context.Context) ReplicationControllerPatchArrayOutput { 222 return o 223 } 224 225 func (o ReplicationControllerPatchArrayOutput) Index(i pulumi.IntInput) ReplicationControllerPatchOutput { 226 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *ReplicationControllerPatch { 227 return vs[0].([]*ReplicationControllerPatch)[vs[1].(int)] 228 }).(ReplicationControllerPatchOutput) 229 } 230 231 type ReplicationControllerPatchMapOutput struct{ *pulumi.OutputState } 232 233 func (ReplicationControllerPatchMapOutput) ElementType() reflect.Type { 234 return reflect.TypeOf((*map[string]*ReplicationControllerPatch)(nil)).Elem() 235 } 236 237 func (o ReplicationControllerPatchMapOutput) ToReplicationControllerPatchMapOutput() ReplicationControllerPatchMapOutput { 238 return o 239 } 240 241 func (o ReplicationControllerPatchMapOutput) ToReplicationControllerPatchMapOutputWithContext(ctx context.Context) ReplicationControllerPatchMapOutput { 242 return o 243 } 244 245 func (o ReplicationControllerPatchMapOutput) MapIndex(k pulumi.StringInput) ReplicationControllerPatchOutput { 246 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *ReplicationControllerPatch { 247 return vs[0].(map[string]*ReplicationControllerPatch)[vs[1].(string)] 248 }).(ReplicationControllerPatchOutput) 249 } 250 251 func init() { 252 pulumi.RegisterInputType(reflect.TypeOf((*ReplicationControllerPatchInput)(nil)).Elem(), &ReplicationControllerPatch{}) 253 pulumi.RegisterInputType(reflect.TypeOf((*ReplicationControllerPatchArrayInput)(nil)).Elem(), ReplicationControllerPatchArray{}) 254 pulumi.RegisterInputType(reflect.TypeOf((*ReplicationControllerPatchMapInput)(nil)).Elem(), ReplicationControllerPatchMap{}) 255 pulumi.RegisterOutputType(ReplicationControllerPatchOutput{}) 256 pulumi.RegisterOutputType(ReplicationControllerPatchArrayOutput{}) 257 pulumi.RegisterOutputType(ReplicationControllerPatchMapOutput{}) 258 }