github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/meta/v1/statusPatch.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 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 11 ) 12 13 // Patch resources are used to modify existing Kubernetes resources by using 14 // Server-Side Apply updates. The name of the resource must be specified, but all other properties are optional. More than 15 // one patch may be applied to the same resource, and a random FieldManager name will be used for each Patch resource. 16 // Conflicts will result in an error by default, but can be forced using the "pulumi.com/patchForce" annotation. See the 17 // [Server-Side Apply Docs](https://www.pulumi.com/registry/packages/kubernetes/how-to-guides/managing-resources-with-server-side-apply/) for 18 // additional information about using Server-Side Apply to manage Kubernetes resources with Pulumi. 19 // Status is a return value for calls that don't return other objects. 20 type StatusPatch struct { 21 pulumi.CustomResourceState 22 23 // 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 24 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 25 // Suggested HTTP return code for this status, 0 if not set. 26 Code pulumi.IntPtrOutput `pulumi:"code"` 27 // Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type. 28 Details StatusDetailsPatchPtrOutput `pulumi:"details"` 29 // 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 30 Kind pulumi.StringPtrOutput `pulumi:"kind"` 31 // A human-readable description of the status of this operation. 32 Message pulumi.StringPtrOutput `pulumi:"message"` 33 // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 34 Metadata ListMetaPatchPtrOutput `pulumi:"metadata"` 35 // A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. 36 Reason pulumi.StringPtrOutput `pulumi:"reason"` 37 // Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 38 Status pulumi.StringPtrOutput `pulumi:"status"` 39 } 40 41 // NewStatusPatch registers a new resource with the given unique name, arguments, and options. 42 func NewStatusPatch(ctx *pulumi.Context, 43 name string, args *StatusPatchArgs, opts ...pulumi.ResourceOption) (*StatusPatch, error) { 44 if args == nil { 45 args = &StatusPatchArgs{} 46 } 47 48 args.ApiVersion = pulumi.StringPtr("v1") 49 args.Kind = pulumi.StringPtr("Status") 50 var resource StatusPatch 51 err := ctx.RegisterResource("kubernetes:meta/v1:StatusPatch", name, args, &resource, opts...) 52 if err != nil { 53 return nil, err 54 } 55 return &resource, nil 56 } 57 58 // GetStatusPatch gets an existing StatusPatch resource's state with the given name, ID, and optional 59 // state properties that are used to uniquely qualify the lookup (nil if not required). 60 func GetStatusPatch(ctx *pulumi.Context, 61 name string, id pulumi.IDInput, state *StatusPatchState, opts ...pulumi.ResourceOption) (*StatusPatch, error) { 62 var resource StatusPatch 63 err := ctx.ReadResource("kubernetes:meta/v1:StatusPatch", name, id, state, &resource, opts...) 64 if err != nil { 65 return nil, err 66 } 67 return &resource, nil 68 } 69 70 // Input properties used for looking up and filtering StatusPatch resources. 71 type statusPatchState struct { 72 } 73 74 type StatusPatchState struct { 75 } 76 77 func (StatusPatchState) ElementType() reflect.Type { 78 return reflect.TypeOf((*statusPatchState)(nil)).Elem() 79 } 80 81 type statusPatchArgs struct { 82 // 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 83 ApiVersion *string `pulumi:"apiVersion"` 84 // Suggested HTTP return code for this status, 0 if not set. 85 Code *int `pulumi:"code"` 86 // Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type. 87 Details *StatusDetailsPatch `pulumi:"details"` 88 // 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 89 Kind *string `pulumi:"kind"` 90 // A human-readable description of the status of this operation. 91 Message *string `pulumi:"message"` 92 // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 93 Metadata *ListMetaPatch `pulumi:"metadata"` 94 // A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. 95 Reason *string `pulumi:"reason"` 96 } 97 98 // The set of arguments for constructing a StatusPatch resource. 99 type StatusPatchArgs 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 // Suggested HTTP return code for this status, 0 if not set. 103 Code pulumi.IntPtrInput 104 // Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type. 105 Details StatusDetailsPatchPtrInput 106 // 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 107 Kind pulumi.StringPtrInput 108 // A human-readable description of the status of this operation. 109 Message pulumi.StringPtrInput 110 // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 111 Metadata ListMetaPatchPtrInput 112 // A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. 113 Reason pulumi.StringPtrInput 114 } 115 116 func (StatusPatchArgs) ElementType() reflect.Type { 117 return reflect.TypeOf((*statusPatchArgs)(nil)).Elem() 118 } 119 120 type StatusPatchInput interface { 121 pulumi.Input 122 123 ToStatusPatchOutput() StatusPatchOutput 124 ToStatusPatchOutputWithContext(ctx context.Context) StatusPatchOutput 125 } 126 127 func (*StatusPatch) ElementType() reflect.Type { 128 return reflect.TypeOf((**StatusPatch)(nil)).Elem() 129 } 130 131 func (i *StatusPatch) ToStatusPatchOutput() StatusPatchOutput { 132 return i.ToStatusPatchOutputWithContext(context.Background()) 133 } 134 135 func (i *StatusPatch) ToStatusPatchOutputWithContext(ctx context.Context) StatusPatchOutput { 136 return pulumi.ToOutputWithContext(ctx, i).(StatusPatchOutput) 137 } 138 139 // StatusPatchArrayInput is an input type that accepts StatusPatchArray and StatusPatchArrayOutput values. 140 // You can construct a concrete instance of `StatusPatchArrayInput` via: 141 // 142 // StatusPatchArray{ StatusPatchArgs{...} } 143 type StatusPatchArrayInput interface { 144 pulumi.Input 145 146 ToStatusPatchArrayOutput() StatusPatchArrayOutput 147 ToStatusPatchArrayOutputWithContext(context.Context) StatusPatchArrayOutput 148 } 149 150 type StatusPatchArray []StatusPatchInput 151 152 func (StatusPatchArray) ElementType() reflect.Type { 153 return reflect.TypeOf((*[]*StatusPatch)(nil)).Elem() 154 } 155 156 func (i StatusPatchArray) ToStatusPatchArrayOutput() StatusPatchArrayOutput { 157 return i.ToStatusPatchArrayOutputWithContext(context.Background()) 158 } 159 160 func (i StatusPatchArray) ToStatusPatchArrayOutputWithContext(ctx context.Context) StatusPatchArrayOutput { 161 return pulumi.ToOutputWithContext(ctx, i).(StatusPatchArrayOutput) 162 } 163 164 // StatusPatchMapInput is an input type that accepts StatusPatchMap and StatusPatchMapOutput values. 165 // You can construct a concrete instance of `StatusPatchMapInput` via: 166 // 167 // StatusPatchMap{ "key": StatusPatchArgs{...} } 168 type StatusPatchMapInput interface { 169 pulumi.Input 170 171 ToStatusPatchMapOutput() StatusPatchMapOutput 172 ToStatusPatchMapOutputWithContext(context.Context) StatusPatchMapOutput 173 } 174 175 type StatusPatchMap map[string]StatusPatchInput 176 177 func (StatusPatchMap) ElementType() reflect.Type { 178 return reflect.TypeOf((*map[string]*StatusPatch)(nil)).Elem() 179 } 180 181 func (i StatusPatchMap) ToStatusPatchMapOutput() StatusPatchMapOutput { 182 return i.ToStatusPatchMapOutputWithContext(context.Background()) 183 } 184 185 func (i StatusPatchMap) ToStatusPatchMapOutputWithContext(ctx context.Context) StatusPatchMapOutput { 186 return pulumi.ToOutputWithContext(ctx, i).(StatusPatchMapOutput) 187 } 188 189 type StatusPatchOutput struct{ *pulumi.OutputState } 190 191 func (StatusPatchOutput) ElementType() reflect.Type { 192 return reflect.TypeOf((**StatusPatch)(nil)).Elem() 193 } 194 195 func (o StatusPatchOutput) ToStatusPatchOutput() StatusPatchOutput { 196 return o 197 } 198 199 func (o StatusPatchOutput) ToStatusPatchOutputWithContext(ctx context.Context) StatusPatchOutput { 200 return o 201 } 202 203 // 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 204 func (o StatusPatchOutput) ApiVersion() pulumi.StringPtrOutput { 205 return o.ApplyT(func(v *StatusPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 206 } 207 208 // Suggested HTTP return code for this status, 0 if not set. 209 func (o StatusPatchOutput) Code() pulumi.IntPtrOutput { 210 return o.ApplyT(func(v *StatusPatch) pulumi.IntPtrOutput { return v.Code }).(pulumi.IntPtrOutput) 211 } 212 213 // Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type. 214 func (o StatusPatchOutput) Details() StatusDetailsPatchPtrOutput { 215 return o.ApplyT(func(v *StatusPatch) StatusDetailsPatchPtrOutput { return v.Details }).(StatusDetailsPatchPtrOutput) 216 } 217 218 // 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 219 func (o StatusPatchOutput) Kind() pulumi.StringPtrOutput { 220 return o.ApplyT(func(v *StatusPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 221 } 222 223 // A human-readable description of the status of this operation. 224 func (o StatusPatchOutput) Message() pulumi.StringPtrOutput { 225 return o.ApplyT(func(v *StatusPatch) pulumi.StringPtrOutput { return v.Message }).(pulumi.StringPtrOutput) 226 } 227 228 // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 229 func (o StatusPatchOutput) Metadata() ListMetaPatchPtrOutput { 230 return o.ApplyT(func(v *StatusPatch) ListMetaPatchPtrOutput { return v.Metadata }).(ListMetaPatchPtrOutput) 231 } 232 233 // A machine-readable description of why this operation is in the "Failure" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it. 234 func (o StatusPatchOutput) Reason() pulumi.StringPtrOutput { 235 return o.ApplyT(func(v *StatusPatch) pulumi.StringPtrOutput { return v.Reason }).(pulumi.StringPtrOutput) 236 } 237 238 // Status of the operation. One of: "Success" or "Failure". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 239 func (o StatusPatchOutput) Status() pulumi.StringPtrOutput { 240 return o.ApplyT(func(v *StatusPatch) pulumi.StringPtrOutput { return v.Status }).(pulumi.StringPtrOutput) 241 } 242 243 type StatusPatchArrayOutput struct{ *pulumi.OutputState } 244 245 func (StatusPatchArrayOutput) ElementType() reflect.Type { 246 return reflect.TypeOf((*[]*StatusPatch)(nil)).Elem() 247 } 248 249 func (o StatusPatchArrayOutput) ToStatusPatchArrayOutput() StatusPatchArrayOutput { 250 return o 251 } 252 253 func (o StatusPatchArrayOutput) ToStatusPatchArrayOutputWithContext(ctx context.Context) StatusPatchArrayOutput { 254 return o 255 } 256 257 func (o StatusPatchArrayOutput) Index(i pulumi.IntInput) StatusPatchOutput { 258 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StatusPatch { 259 return vs[0].([]*StatusPatch)[vs[1].(int)] 260 }).(StatusPatchOutput) 261 } 262 263 type StatusPatchMapOutput struct{ *pulumi.OutputState } 264 265 func (StatusPatchMapOutput) ElementType() reflect.Type { 266 return reflect.TypeOf((*map[string]*StatusPatch)(nil)).Elem() 267 } 268 269 func (o StatusPatchMapOutput) ToStatusPatchMapOutput() StatusPatchMapOutput { 270 return o 271 } 272 273 func (o StatusPatchMapOutput) ToStatusPatchMapOutputWithContext(ctx context.Context) StatusPatchMapOutput { 274 return o 275 } 276 277 func (o StatusPatchMapOutput) MapIndex(k pulumi.StringInput) StatusPatchOutput { 278 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StatusPatch { 279 return vs[0].(map[string]*StatusPatch)[vs[1].(string)] 280 }).(StatusPatchOutput) 281 } 282 283 func init() { 284 pulumi.RegisterInputType(reflect.TypeOf((*StatusPatchInput)(nil)).Elem(), &StatusPatch{}) 285 pulumi.RegisterInputType(reflect.TypeOf((*StatusPatchArrayInput)(nil)).Elem(), StatusPatchArray{}) 286 pulumi.RegisterInputType(reflect.TypeOf((*StatusPatchMapInput)(nil)).Elem(), StatusPatchMap{}) 287 pulumi.RegisterOutputType(StatusPatchOutput{}) 288 pulumi.RegisterOutputType(StatusPatchArrayOutput{}) 289 pulumi.RegisterOutputType(StatusPatchMapOutput{}) 290 }