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