github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/meta/v1/status.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 // Status is a return value for calls that don't return other objects. 14 type Status struct { 15 pulumi.CustomResourceState 16 17 // 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 18 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 19 // Suggested HTTP return code for this status, 0 if not set. 20 Code pulumi.IntPtrOutput `pulumi:"code"` 21 // 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. 22 Details StatusDetailsPtrOutput `pulumi:"details"` 23 // 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 24 Kind pulumi.StringPtrOutput `pulumi:"kind"` 25 // A human-readable description of the status of this operation. 26 Message pulumi.StringPtrOutput `pulumi:"message"` 27 // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 28 Metadata ListMetaPtrOutput `pulumi:"metadata"` 29 // 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. 30 Reason pulumi.StringPtrOutput `pulumi:"reason"` 31 // 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 32 Status pulumi.StringPtrOutput `pulumi:"status"` 33 } 34 35 // NewStatus registers a new resource with the given unique name, arguments, and options. 36 func NewStatus(ctx *pulumi.Context, 37 name string, args *StatusArgs, opts ...pulumi.ResourceOption) (*Status, error) { 38 if args == nil { 39 args = &StatusArgs{} 40 } 41 42 args.ApiVersion = pulumi.StringPtr("v1") 43 args.Kind = pulumi.StringPtr("Status") 44 var resource Status 45 err := ctx.RegisterResource("kubernetes:meta/v1:Status", name, args, &resource, opts...) 46 if err != nil { 47 return nil, err 48 } 49 return &resource, nil 50 } 51 52 // GetStatus gets an existing Status resource's state with the given name, ID, and optional 53 // state properties that are used to uniquely qualify the lookup (nil if not required). 54 func GetStatus(ctx *pulumi.Context, 55 name string, id pulumi.IDInput, state *StatusState, opts ...pulumi.ResourceOption) (*Status, error) { 56 var resource Status 57 err := ctx.ReadResource("kubernetes:meta/v1:Status", name, id, state, &resource, opts...) 58 if err != nil { 59 return nil, err 60 } 61 return &resource, nil 62 } 63 64 // Input properties used for looking up and filtering Status resources. 65 type statusState struct { 66 } 67 68 type StatusState struct { 69 } 70 71 func (StatusState) ElementType() reflect.Type { 72 return reflect.TypeOf((*statusState)(nil)).Elem() 73 } 74 75 type statusArgs struct { 76 // 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 77 ApiVersion *string `pulumi:"apiVersion"` 78 // Suggested HTTP return code for this status, 0 if not set. 79 Code *int `pulumi:"code"` 80 // 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. 81 Details *StatusDetails `pulumi:"details"` 82 // 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 83 Kind *string `pulumi:"kind"` 84 // A human-readable description of the status of this operation. 85 Message *string `pulumi:"message"` 86 // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 87 Metadata *ListMeta `pulumi:"metadata"` 88 // 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. 89 Reason *string `pulumi:"reason"` 90 } 91 92 // The set of arguments for constructing a Status resource. 93 type StatusArgs struct { 94 // 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 95 ApiVersion pulumi.StringPtrInput 96 // Suggested HTTP return code for this status, 0 if not set. 97 Code pulumi.IntPtrInput 98 // 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. 99 Details StatusDetailsPtrInput 100 // 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 101 Kind pulumi.StringPtrInput 102 // A human-readable description of the status of this operation. 103 Message pulumi.StringPtrInput 104 // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 105 Metadata ListMetaPtrInput 106 // 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. 107 Reason pulumi.StringPtrInput 108 } 109 110 func (StatusArgs) ElementType() reflect.Type { 111 return reflect.TypeOf((*statusArgs)(nil)).Elem() 112 } 113 114 type StatusInput interface { 115 pulumi.Input 116 117 ToStatusOutput() StatusOutput 118 ToStatusOutputWithContext(ctx context.Context) StatusOutput 119 } 120 121 func (*Status) ElementType() reflect.Type { 122 return reflect.TypeOf((**Status)(nil)).Elem() 123 } 124 125 func (i *Status) ToStatusOutput() StatusOutput { 126 return i.ToStatusOutputWithContext(context.Background()) 127 } 128 129 func (i *Status) ToStatusOutputWithContext(ctx context.Context) StatusOutput { 130 return pulumi.ToOutputWithContext(ctx, i).(StatusOutput) 131 } 132 133 // StatusArrayInput is an input type that accepts StatusArray and StatusArrayOutput values. 134 // You can construct a concrete instance of `StatusArrayInput` via: 135 // 136 // StatusArray{ StatusArgs{...} } 137 type StatusArrayInput interface { 138 pulumi.Input 139 140 ToStatusArrayOutput() StatusArrayOutput 141 ToStatusArrayOutputWithContext(context.Context) StatusArrayOutput 142 } 143 144 type StatusArray []StatusInput 145 146 func (StatusArray) ElementType() reflect.Type { 147 return reflect.TypeOf((*[]*Status)(nil)).Elem() 148 } 149 150 func (i StatusArray) ToStatusArrayOutput() StatusArrayOutput { 151 return i.ToStatusArrayOutputWithContext(context.Background()) 152 } 153 154 func (i StatusArray) ToStatusArrayOutputWithContext(ctx context.Context) StatusArrayOutput { 155 return pulumi.ToOutputWithContext(ctx, i).(StatusArrayOutput) 156 } 157 158 // StatusMapInput is an input type that accepts StatusMap and StatusMapOutput values. 159 // You can construct a concrete instance of `StatusMapInput` via: 160 // 161 // StatusMap{ "key": StatusArgs{...} } 162 type StatusMapInput interface { 163 pulumi.Input 164 165 ToStatusMapOutput() StatusMapOutput 166 ToStatusMapOutputWithContext(context.Context) StatusMapOutput 167 } 168 169 type StatusMap map[string]StatusInput 170 171 func (StatusMap) ElementType() reflect.Type { 172 return reflect.TypeOf((*map[string]*Status)(nil)).Elem() 173 } 174 175 func (i StatusMap) ToStatusMapOutput() StatusMapOutput { 176 return i.ToStatusMapOutputWithContext(context.Background()) 177 } 178 179 func (i StatusMap) ToStatusMapOutputWithContext(ctx context.Context) StatusMapOutput { 180 return pulumi.ToOutputWithContext(ctx, i).(StatusMapOutput) 181 } 182 183 type StatusOutput struct{ *pulumi.OutputState } 184 185 func (StatusOutput) ElementType() reflect.Type { 186 return reflect.TypeOf((**Status)(nil)).Elem() 187 } 188 189 func (o StatusOutput) ToStatusOutput() StatusOutput { 190 return o 191 } 192 193 func (o StatusOutput) ToStatusOutputWithContext(ctx context.Context) StatusOutput { 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 StatusOutput) ApiVersion() pulumi.StringPtrOutput { 199 return o.ApplyT(func(v *Status) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 200 } 201 202 // Suggested HTTP return code for this status, 0 if not set. 203 func (o StatusOutput) Code() pulumi.IntPtrOutput { 204 return o.ApplyT(func(v *Status) pulumi.IntPtrOutput { return v.Code }).(pulumi.IntPtrOutput) 205 } 206 207 // 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. 208 func (o StatusOutput) Details() StatusDetailsPtrOutput { 209 return o.ApplyT(func(v *Status) StatusDetailsPtrOutput { return v.Details }).(StatusDetailsPtrOutput) 210 } 211 212 // 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 213 func (o StatusOutput) Kind() pulumi.StringPtrOutput { 214 return o.ApplyT(func(v *Status) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 215 } 216 217 // A human-readable description of the status of this operation. 218 func (o StatusOutput) Message() pulumi.StringPtrOutput { 219 return o.ApplyT(func(v *Status) pulumi.StringPtrOutput { return v.Message }).(pulumi.StringPtrOutput) 220 } 221 222 // Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 223 func (o StatusOutput) Metadata() ListMetaPtrOutput { 224 return o.ApplyT(func(v *Status) ListMetaPtrOutput { return v.Metadata }).(ListMetaPtrOutput) 225 } 226 227 // 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. 228 func (o StatusOutput) Reason() pulumi.StringPtrOutput { 229 return o.ApplyT(func(v *Status) pulumi.StringPtrOutput { return v.Reason }).(pulumi.StringPtrOutput) 230 } 231 232 // 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 233 func (o StatusOutput) Status() pulumi.StringPtrOutput { 234 return o.ApplyT(func(v *Status) pulumi.StringPtrOutput { return v.Status }).(pulumi.StringPtrOutput) 235 } 236 237 type StatusArrayOutput struct{ *pulumi.OutputState } 238 239 func (StatusArrayOutput) ElementType() reflect.Type { 240 return reflect.TypeOf((*[]*Status)(nil)).Elem() 241 } 242 243 func (o StatusArrayOutput) ToStatusArrayOutput() StatusArrayOutput { 244 return o 245 } 246 247 func (o StatusArrayOutput) ToStatusArrayOutputWithContext(ctx context.Context) StatusArrayOutput { 248 return o 249 } 250 251 func (o StatusArrayOutput) Index(i pulumi.IntInput) StatusOutput { 252 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Status { 253 return vs[0].([]*Status)[vs[1].(int)] 254 }).(StatusOutput) 255 } 256 257 type StatusMapOutput struct{ *pulumi.OutputState } 258 259 func (StatusMapOutput) ElementType() reflect.Type { 260 return reflect.TypeOf((*map[string]*Status)(nil)).Elem() 261 } 262 263 func (o StatusMapOutput) ToStatusMapOutput() StatusMapOutput { 264 return o 265 } 266 267 func (o StatusMapOutput) ToStatusMapOutputWithContext(ctx context.Context) StatusMapOutput { 268 return o 269 } 270 271 func (o StatusMapOutput) MapIndex(k pulumi.StringInput) StatusOutput { 272 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Status { 273 return vs[0].(map[string]*Status)[vs[1].(string)] 274 }).(StatusOutput) 275 } 276 277 func init() { 278 pulumi.RegisterInputType(reflect.TypeOf((*StatusInput)(nil)).Elem(), &Status{}) 279 pulumi.RegisterInputType(reflect.TypeOf((*StatusArrayInput)(nil)).Elem(), StatusArray{}) 280 pulumi.RegisterInputType(reflect.TypeOf((*StatusMapInput)(nil)).Elem(), StatusMap{}) 281 pulumi.RegisterOutputType(StatusOutput{}) 282 pulumi.RegisterOutputType(StatusArrayOutput{}) 283 pulumi.RegisterOutputType(StatusMapOutput{}) 284 }