github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/batch/v1beta1/cronJobPatch.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 // CronJob represents the configuration of a single cron job. 21 type CronJobPatch 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 // 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 // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 31 Spec CronJobSpecPatchPtrOutput `pulumi:"spec"` 32 // Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 33 Status CronJobStatusPatchPtrOutput `pulumi:"status"` 34 } 35 36 // NewCronJobPatch registers a new resource with the given unique name, arguments, and options. 37 func NewCronJobPatch(ctx *pulumi.Context, 38 name string, args *CronJobPatchArgs, opts ...pulumi.ResourceOption) (*CronJobPatch, error) { 39 if args == nil { 40 args = &CronJobPatchArgs{} 41 } 42 43 args.ApiVersion = pulumi.StringPtr("batch/v1beta1") 44 args.Kind = pulumi.StringPtr("CronJob") 45 aliases := pulumi.Aliases([]pulumi.Alias{ 46 { 47 Type: pulumi.String("kubernetes:batch/v1:CronJobPatch"), 48 }, 49 { 50 Type: pulumi.String("kubernetes:batch/v2alpha1:CronJobPatch"), 51 }, 52 }) 53 opts = append(opts, aliases) 54 var resource CronJobPatch 55 err := ctx.RegisterResource("kubernetes:batch/v1beta1:CronJobPatch", name, args, &resource, opts...) 56 if err != nil { 57 return nil, err 58 } 59 return &resource, nil 60 } 61 62 // GetCronJobPatch gets an existing CronJobPatch resource's state with the given name, ID, and optional 63 // state properties that are used to uniquely qualify the lookup (nil if not required). 64 func GetCronJobPatch(ctx *pulumi.Context, 65 name string, id pulumi.IDInput, state *CronJobPatchState, opts ...pulumi.ResourceOption) (*CronJobPatch, error) { 66 var resource CronJobPatch 67 err := ctx.ReadResource("kubernetes:batch/v1beta1:CronJobPatch", name, id, state, &resource, opts...) 68 if err != nil { 69 return nil, err 70 } 71 return &resource, nil 72 } 73 74 // Input properties used for looking up and filtering CronJobPatch resources. 75 type cronJobPatchState struct { 76 } 77 78 type CronJobPatchState struct { 79 } 80 81 func (CronJobPatchState) ElementType() reflect.Type { 82 return reflect.TypeOf((*cronJobPatchState)(nil)).Elem() 83 } 84 85 type cronJobPatchArgs struct { 86 // 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 87 ApiVersion *string `pulumi:"apiVersion"` 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 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 91 Metadata *metav1.ObjectMetaPatch `pulumi:"metadata"` 92 // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 93 Spec *CronJobSpecPatch `pulumi:"spec"` 94 } 95 96 // The set of arguments for constructing a CronJobPatch resource. 97 type CronJobPatchArgs struct { 98 // 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 99 ApiVersion pulumi.StringPtrInput 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 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 103 Metadata metav1.ObjectMetaPatchPtrInput 104 // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 105 Spec CronJobSpecPatchPtrInput 106 } 107 108 func (CronJobPatchArgs) ElementType() reflect.Type { 109 return reflect.TypeOf((*cronJobPatchArgs)(nil)).Elem() 110 } 111 112 type CronJobPatchInput interface { 113 pulumi.Input 114 115 ToCronJobPatchOutput() CronJobPatchOutput 116 ToCronJobPatchOutputWithContext(ctx context.Context) CronJobPatchOutput 117 } 118 119 func (*CronJobPatch) ElementType() reflect.Type { 120 return reflect.TypeOf((**CronJobPatch)(nil)).Elem() 121 } 122 123 func (i *CronJobPatch) ToCronJobPatchOutput() CronJobPatchOutput { 124 return i.ToCronJobPatchOutputWithContext(context.Background()) 125 } 126 127 func (i *CronJobPatch) ToCronJobPatchOutputWithContext(ctx context.Context) CronJobPatchOutput { 128 return pulumi.ToOutputWithContext(ctx, i).(CronJobPatchOutput) 129 } 130 131 // CronJobPatchArrayInput is an input type that accepts CronJobPatchArray and CronJobPatchArrayOutput values. 132 // You can construct a concrete instance of `CronJobPatchArrayInput` via: 133 // 134 // CronJobPatchArray{ CronJobPatchArgs{...} } 135 type CronJobPatchArrayInput interface { 136 pulumi.Input 137 138 ToCronJobPatchArrayOutput() CronJobPatchArrayOutput 139 ToCronJobPatchArrayOutputWithContext(context.Context) CronJobPatchArrayOutput 140 } 141 142 type CronJobPatchArray []CronJobPatchInput 143 144 func (CronJobPatchArray) ElementType() reflect.Type { 145 return reflect.TypeOf((*[]*CronJobPatch)(nil)).Elem() 146 } 147 148 func (i CronJobPatchArray) ToCronJobPatchArrayOutput() CronJobPatchArrayOutput { 149 return i.ToCronJobPatchArrayOutputWithContext(context.Background()) 150 } 151 152 func (i CronJobPatchArray) ToCronJobPatchArrayOutputWithContext(ctx context.Context) CronJobPatchArrayOutput { 153 return pulumi.ToOutputWithContext(ctx, i).(CronJobPatchArrayOutput) 154 } 155 156 // CronJobPatchMapInput is an input type that accepts CronJobPatchMap and CronJobPatchMapOutput values. 157 // You can construct a concrete instance of `CronJobPatchMapInput` via: 158 // 159 // CronJobPatchMap{ "key": CronJobPatchArgs{...} } 160 type CronJobPatchMapInput interface { 161 pulumi.Input 162 163 ToCronJobPatchMapOutput() CronJobPatchMapOutput 164 ToCronJobPatchMapOutputWithContext(context.Context) CronJobPatchMapOutput 165 } 166 167 type CronJobPatchMap map[string]CronJobPatchInput 168 169 func (CronJobPatchMap) ElementType() reflect.Type { 170 return reflect.TypeOf((*map[string]*CronJobPatch)(nil)).Elem() 171 } 172 173 func (i CronJobPatchMap) ToCronJobPatchMapOutput() CronJobPatchMapOutput { 174 return i.ToCronJobPatchMapOutputWithContext(context.Background()) 175 } 176 177 func (i CronJobPatchMap) ToCronJobPatchMapOutputWithContext(ctx context.Context) CronJobPatchMapOutput { 178 return pulumi.ToOutputWithContext(ctx, i).(CronJobPatchMapOutput) 179 } 180 181 type CronJobPatchOutput struct{ *pulumi.OutputState } 182 183 func (CronJobPatchOutput) ElementType() reflect.Type { 184 return reflect.TypeOf((**CronJobPatch)(nil)).Elem() 185 } 186 187 func (o CronJobPatchOutput) ToCronJobPatchOutput() CronJobPatchOutput { 188 return o 189 } 190 191 func (o CronJobPatchOutput) ToCronJobPatchOutputWithContext(ctx context.Context) CronJobPatchOutput { 192 return o 193 } 194 195 // 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 196 func (o CronJobPatchOutput) ApiVersion() pulumi.StringPtrOutput { 197 return o.ApplyT(func(v *CronJobPatch) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 198 } 199 200 // 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 201 func (o CronJobPatchOutput) Kind() pulumi.StringPtrOutput { 202 return o.ApplyT(func(v *CronJobPatch) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 203 } 204 205 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 206 func (o CronJobPatchOutput) Metadata() metav1.ObjectMetaPatchPtrOutput { 207 return o.ApplyT(func(v *CronJobPatch) metav1.ObjectMetaPatchPtrOutput { return v.Metadata }).(metav1.ObjectMetaPatchPtrOutput) 208 } 209 210 // Specification of the desired behavior of a cron job, including the schedule. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 211 func (o CronJobPatchOutput) Spec() CronJobSpecPatchPtrOutput { 212 return o.ApplyT(func(v *CronJobPatch) CronJobSpecPatchPtrOutput { return v.Spec }).(CronJobSpecPatchPtrOutput) 213 } 214 215 // Current status of a cron job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 216 func (o CronJobPatchOutput) Status() CronJobStatusPatchPtrOutput { 217 return o.ApplyT(func(v *CronJobPatch) CronJobStatusPatchPtrOutput { return v.Status }).(CronJobStatusPatchPtrOutput) 218 } 219 220 type CronJobPatchArrayOutput struct{ *pulumi.OutputState } 221 222 func (CronJobPatchArrayOutput) ElementType() reflect.Type { 223 return reflect.TypeOf((*[]*CronJobPatch)(nil)).Elem() 224 } 225 226 func (o CronJobPatchArrayOutput) ToCronJobPatchArrayOutput() CronJobPatchArrayOutput { 227 return o 228 } 229 230 func (o CronJobPatchArrayOutput) ToCronJobPatchArrayOutputWithContext(ctx context.Context) CronJobPatchArrayOutput { 231 return o 232 } 233 234 func (o CronJobPatchArrayOutput) Index(i pulumi.IntInput) CronJobPatchOutput { 235 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *CronJobPatch { 236 return vs[0].([]*CronJobPatch)[vs[1].(int)] 237 }).(CronJobPatchOutput) 238 } 239 240 type CronJobPatchMapOutput struct{ *pulumi.OutputState } 241 242 func (CronJobPatchMapOutput) ElementType() reflect.Type { 243 return reflect.TypeOf((*map[string]*CronJobPatch)(nil)).Elem() 244 } 245 246 func (o CronJobPatchMapOutput) ToCronJobPatchMapOutput() CronJobPatchMapOutput { 247 return o 248 } 249 250 func (o CronJobPatchMapOutput) ToCronJobPatchMapOutputWithContext(ctx context.Context) CronJobPatchMapOutput { 251 return o 252 } 253 254 func (o CronJobPatchMapOutput) MapIndex(k pulumi.StringInput) CronJobPatchOutput { 255 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *CronJobPatch { 256 return vs[0].(map[string]*CronJobPatch)[vs[1].(string)] 257 }).(CronJobPatchOutput) 258 } 259 260 func init() { 261 pulumi.RegisterInputType(reflect.TypeOf((*CronJobPatchInput)(nil)).Elem(), &CronJobPatch{}) 262 pulumi.RegisterInputType(reflect.TypeOf((*CronJobPatchArrayInput)(nil)).Elem(), CronJobPatchArray{}) 263 pulumi.RegisterInputType(reflect.TypeOf((*CronJobPatchMapInput)(nil)).Elem(), CronJobPatchMap{}) 264 pulumi.RegisterOutputType(CronJobPatchOutput{}) 265 pulumi.RegisterOutputType(CronJobPatchArrayOutput{}) 266 pulumi.RegisterOutputType(CronJobPatchMapOutput{}) 267 }