github.com/pulumi/pulumi-kubernetes/sdk/v3@v3.30.2/go/kubernetes/apps/v1beta2/daemonSet.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 v1beta2 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 // DaemonSet represents the configuration of a daemon set. 15 // 16 // Deprecated: apps/v1beta2/DaemonSet is deprecated by apps/v1/DaemonSet and not supported by Kubernetes v1.16+ clusters. 17 type DaemonSet struct { 18 pulumi.CustomResourceState 19 20 // 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 21 ApiVersion pulumi.StringPtrOutput `pulumi:"apiVersion"` 22 // 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 23 Kind pulumi.StringPtrOutput `pulumi:"kind"` 24 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 25 Metadata metav1.ObjectMetaPtrOutput `pulumi:"metadata"` 26 // The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 27 Spec DaemonSetSpecPtrOutput `pulumi:"spec"` 28 // The current status of this daemon set. 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 29 Status DaemonSetStatusPtrOutput `pulumi:"status"` 30 } 31 32 // NewDaemonSet registers a new resource with the given unique name, arguments, and options. 33 func NewDaemonSet(ctx *pulumi.Context, 34 name string, args *DaemonSetArgs, opts ...pulumi.ResourceOption) (*DaemonSet, error) { 35 if args == nil { 36 args = &DaemonSetArgs{} 37 } 38 39 args.ApiVersion = pulumi.StringPtr("apps/v1beta2") 40 args.Kind = pulumi.StringPtr("DaemonSet") 41 aliases := pulumi.Aliases([]pulumi.Alias{ 42 { 43 Type: pulumi.String("kubernetes:apps/v1:DaemonSet"), 44 }, 45 { 46 Type: pulumi.String("kubernetes:extensions/v1beta1:DaemonSet"), 47 }, 48 }) 49 opts = append(opts, aliases) 50 var resource DaemonSet 51 err := ctx.RegisterResource("kubernetes:apps/v1beta2:DaemonSet", name, args, &resource, opts...) 52 if err != nil { 53 return nil, err 54 } 55 return &resource, nil 56 } 57 58 // GetDaemonSet gets an existing DaemonSet 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 GetDaemonSet(ctx *pulumi.Context, 61 name string, id pulumi.IDInput, state *DaemonSetState, opts ...pulumi.ResourceOption) (*DaemonSet, error) { 62 var resource DaemonSet 63 err := ctx.ReadResource("kubernetes:apps/v1beta2:DaemonSet", 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 DaemonSet resources. 71 type daemonSetState struct { 72 } 73 74 type DaemonSetState struct { 75 } 76 77 func (DaemonSetState) ElementType() reflect.Type { 78 return reflect.TypeOf((*daemonSetState)(nil)).Elem() 79 } 80 81 type daemonSetArgs 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 // 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 85 Kind *string `pulumi:"kind"` 86 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 87 Metadata *metav1.ObjectMeta `pulumi:"metadata"` 88 // The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 89 Spec *DaemonSetSpec `pulumi:"spec"` 90 } 91 92 // The set of arguments for constructing a DaemonSet resource. 93 type DaemonSetArgs 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 // 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 97 Kind pulumi.StringPtrInput 98 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 99 Metadata metav1.ObjectMetaPtrInput 100 // The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 101 Spec DaemonSetSpecPtrInput 102 } 103 104 func (DaemonSetArgs) ElementType() reflect.Type { 105 return reflect.TypeOf((*daemonSetArgs)(nil)).Elem() 106 } 107 108 type DaemonSetInput interface { 109 pulumi.Input 110 111 ToDaemonSetOutput() DaemonSetOutput 112 ToDaemonSetOutputWithContext(ctx context.Context) DaemonSetOutput 113 } 114 115 func (*DaemonSet) ElementType() reflect.Type { 116 return reflect.TypeOf((**DaemonSet)(nil)).Elem() 117 } 118 119 func (i *DaemonSet) ToDaemonSetOutput() DaemonSetOutput { 120 return i.ToDaemonSetOutputWithContext(context.Background()) 121 } 122 123 func (i *DaemonSet) ToDaemonSetOutputWithContext(ctx context.Context) DaemonSetOutput { 124 return pulumi.ToOutputWithContext(ctx, i).(DaemonSetOutput) 125 } 126 127 // DaemonSetArrayInput is an input type that accepts DaemonSetArray and DaemonSetArrayOutput values. 128 // You can construct a concrete instance of `DaemonSetArrayInput` via: 129 // 130 // DaemonSetArray{ DaemonSetArgs{...} } 131 type DaemonSetArrayInput interface { 132 pulumi.Input 133 134 ToDaemonSetArrayOutput() DaemonSetArrayOutput 135 ToDaemonSetArrayOutputWithContext(context.Context) DaemonSetArrayOutput 136 } 137 138 type DaemonSetArray []DaemonSetInput 139 140 func (DaemonSetArray) ElementType() reflect.Type { 141 return reflect.TypeOf((*[]*DaemonSet)(nil)).Elem() 142 } 143 144 func (i DaemonSetArray) ToDaemonSetArrayOutput() DaemonSetArrayOutput { 145 return i.ToDaemonSetArrayOutputWithContext(context.Background()) 146 } 147 148 func (i DaemonSetArray) ToDaemonSetArrayOutputWithContext(ctx context.Context) DaemonSetArrayOutput { 149 return pulumi.ToOutputWithContext(ctx, i).(DaemonSetArrayOutput) 150 } 151 152 // DaemonSetMapInput is an input type that accepts DaemonSetMap and DaemonSetMapOutput values. 153 // You can construct a concrete instance of `DaemonSetMapInput` via: 154 // 155 // DaemonSetMap{ "key": DaemonSetArgs{...} } 156 type DaemonSetMapInput interface { 157 pulumi.Input 158 159 ToDaemonSetMapOutput() DaemonSetMapOutput 160 ToDaemonSetMapOutputWithContext(context.Context) DaemonSetMapOutput 161 } 162 163 type DaemonSetMap map[string]DaemonSetInput 164 165 func (DaemonSetMap) ElementType() reflect.Type { 166 return reflect.TypeOf((*map[string]*DaemonSet)(nil)).Elem() 167 } 168 169 func (i DaemonSetMap) ToDaemonSetMapOutput() DaemonSetMapOutput { 170 return i.ToDaemonSetMapOutputWithContext(context.Background()) 171 } 172 173 func (i DaemonSetMap) ToDaemonSetMapOutputWithContext(ctx context.Context) DaemonSetMapOutput { 174 return pulumi.ToOutputWithContext(ctx, i).(DaemonSetMapOutput) 175 } 176 177 type DaemonSetOutput struct{ *pulumi.OutputState } 178 179 func (DaemonSetOutput) ElementType() reflect.Type { 180 return reflect.TypeOf((**DaemonSet)(nil)).Elem() 181 } 182 183 func (o DaemonSetOutput) ToDaemonSetOutput() DaemonSetOutput { 184 return o 185 } 186 187 func (o DaemonSetOutput) ToDaemonSetOutputWithContext(ctx context.Context) DaemonSetOutput { 188 return o 189 } 190 191 // 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 192 func (o DaemonSetOutput) ApiVersion() pulumi.StringPtrOutput { 193 return o.ApplyT(func(v *DaemonSet) pulumi.StringPtrOutput { return v.ApiVersion }).(pulumi.StringPtrOutput) 194 } 195 196 // 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 197 func (o DaemonSetOutput) Kind() pulumi.StringPtrOutput { 198 return o.ApplyT(func(v *DaemonSet) pulumi.StringPtrOutput { return v.Kind }).(pulumi.StringPtrOutput) 199 } 200 201 // Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 202 func (o DaemonSetOutput) Metadata() metav1.ObjectMetaPtrOutput { 203 return o.ApplyT(func(v *DaemonSet) metav1.ObjectMetaPtrOutput { return v.Metadata }).(metav1.ObjectMetaPtrOutput) 204 } 205 206 // The desired behavior of this daemon set. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 207 func (o DaemonSetOutput) Spec() DaemonSetSpecPtrOutput { 208 return o.ApplyT(func(v *DaemonSet) DaemonSetSpecPtrOutput { return v.Spec }).(DaemonSetSpecPtrOutput) 209 } 210 211 // The current status of this daemon set. 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 212 func (o DaemonSetOutput) Status() DaemonSetStatusPtrOutput { 213 return o.ApplyT(func(v *DaemonSet) DaemonSetStatusPtrOutput { return v.Status }).(DaemonSetStatusPtrOutput) 214 } 215 216 type DaemonSetArrayOutput struct{ *pulumi.OutputState } 217 218 func (DaemonSetArrayOutput) ElementType() reflect.Type { 219 return reflect.TypeOf((*[]*DaemonSet)(nil)).Elem() 220 } 221 222 func (o DaemonSetArrayOutput) ToDaemonSetArrayOutput() DaemonSetArrayOutput { 223 return o 224 } 225 226 func (o DaemonSetArrayOutput) ToDaemonSetArrayOutputWithContext(ctx context.Context) DaemonSetArrayOutput { 227 return o 228 } 229 230 func (o DaemonSetArrayOutput) Index(i pulumi.IntInput) DaemonSetOutput { 231 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DaemonSet { 232 return vs[0].([]*DaemonSet)[vs[1].(int)] 233 }).(DaemonSetOutput) 234 } 235 236 type DaemonSetMapOutput struct{ *pulumi.OutputState } 237 238 func (DaemonSetMapOutput) ElementType() reflect.Type { 239 return reflect.TypeOf((*map[string]*DaemonSet)(nil)).Elem() 240 } 241 242 func (o DaemonSetMapOutput) ToDaemonSetMapOutput() DaemonSetMapOutput { 243 return o 244 } 245 246 func (o DaemonSetMapOutput) ToDaemonSetMapOutputWithContext(ctx context.Context) DaemonSetMapOutput { 247 return o 248 } 249 250 func (o DaemonSetMapOutput) MapIndex(k pulumi.StringInput) DaemonSetOutput { 251 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DaemonSet { 252 return vs[0].(map[string]*DaemonSet)[vs[1].(string)] 253 }).(DaemonSetOutput) 254 } 255 256 func init() { 257 pulumi.RegisterInputType(reflect.TypeOf((*DaemonSetInput)(nil)).Elem(), &DaemonSet{}) 258 pulumi.RegisterInputType(reflect.TypeOf((*DaemonSetArrayInput)(nil)).Elem(), DaemonSetArray{}) 259 pulumi.RegisterInputType(reflect.TypeOf((*DaemonSetMapInput)(nil)).Elem(), DaemonSetMap{}) 260 pulumi.RegisterOutputType(DaemonSetOutput{}) 261 pulumi.RegisterOutputType(DaemonSetArrayOutput{}) 262 pulumi.RegisterOutputType(DaemonSetMapOutput{}) 263 }