github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/eks/getNodeGroup.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package eks
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // Retrieve information about an EKS Node Group.
    15  //
    16  // ## Example Usage
    17  //
    18  // <!--Start PulumiCodeChooser -->
    19  // ```go
    20  // package main
    21  //
    22  // import (
    23  //
    24  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/eks"
    25  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    26  //
    27  // )
    28  //
    29  //	func main() {
    30  //		pulumi.Run(func(ctx *pulumi.Context) error {
    31  //			_, err := eks.LookupNodeGroup(ctx, &eks.LookupNodeGroupArgs{
    32  //				ClusterName:   "example",
    33  //				NodeGroupName: "example",
    34  //			}, nil)
    35  //			if err != nil {
    36  //				return err
    37  //			}
    38  //			return nil
    39  //		})
    40  //	}
    41  //
    42  // ```
    43  // <!--End PulumiCodeChooser -->
    44  func LookupNodeGroup(ctx *pulumi.Context, args *LookupNodeGroupArgs, opts ...pulumi.InvokeOption) (*LookupNodeGroupResult, error) {
    45  	opts = internal.PkgInvokeDefaultOpts(opts)
    46  	var rv LookupNodeGroupResult
    47  	err := ctx.Invoke("aws:eks/getNodeGroup:getNodeGroup", args, &rv, opts...)
    48  	if err != nil {
    49  		return nil, err
    50  	}
    51  	return &rv, nil
    52  }
    53  
    54  // A collection of arguments for invoking getNodeGroup.
    55  type LookupNodeGroupArgs struct {
    56  	// Name of the cluster.
    57  	ClusterName string `pulumi:"clusterName"`
    58  	// Name of the node group.
    59  	NodeGroupName string `pulumi:"nodeGroupName"`
    60  	// Key-value map of resource tags.
    61  	Tags map[string]string `pulumi:"tags"`
    62  }
    63  
    64  // A collection of values returned by getNodeGroup.
    65  type LookupNodeGroupResult struct {
    66  	// Type of Amazon Machine Image (AMI) associated with the EKS Node Group.
    67  	AmiType string `pulumi:"amiType"`
    68  	// ARN of the EKS Node Group.
    69  	Arn string `pulumi:"arn"`
    70  	// Type of capacity associated with the EKS Node Group. Valid values: `ON_DEMAND`, `SPOT`.
    71  	CapacityType string `pulumi:"capacityType"`
    72  	ClusterName  string `pulumi:"clusterName"`
    73  	// Disk size in GiB for worker nodes.
    74  	DiskSize int `pulumi:"diskSize"`
    75  	// The provider-assigned unique ID for this managed resource.
    76  	Id string `pulumi:"id"`
    77  	// Set of instance types associated with the EKS Node Group.
    78  	InstanceTypes []string `pulumi:"instanceTypes"`
    79  	// Key-value map of Kubernetes labels. Only labels that are applied with the EKS API are managed by this argument. Other Kubernetes labels applied to the EKS Node Group will not be managed.
    80  	Labels map[string]string `pulumi:"labels"`
    81  	// Nested attribute containing information about the launch template used to create the EKS Node Group.
    82  	LaunchTemplates []GetNodeGroupLaunchTemplate `pulumi:"launchTemplates"`
    83  	NodeGroupName   string                       `pulumi:"nodeGroupName"`
    84  	// ARN of the IAM Role that provides permissions for the EKS Node Group.
    85  	NodeRoleArn string `pulumi:"nodeRoleArn"`
    86  	// AMI version of the EKS Node Group.
    87  	ReleaseVersion string `pulumi:"releaseVersion"`
    88  	// Configuration block with remote access settings.
    89  	RemoteAccesses []GetNodeGroupRemoteAccess `pulumi:"remoteAccesses"`
    90  	// List of objects containing information about underlying resources.
    91  	Resources []GetNodeGroupResource `pulumi:"resources"`
    92  	// Configuration block with scaling settings.
    93  	ScalingConfigs []GetNodeGroupScalingConfig `pulumi:"scalingConfigs"`
    94  	// Status of the EKS Node Group.
    95  	Status string `pulumi:"status"`
    96  	// Identifiers of EC2 Subnets to associate with the EKS Node Group.
    97  	SubnetIds []string `pulumi:"subnetIds"`
    98  	// Key-value map of resource tags.
    99  	Tags map[string]string `pulumi:"tags"`
   100  	// List of objects containing information about taints applied to the nodes in the EKS Node Group.
   101  	Taints []GetNodeGroupTaint `pulumi:"taints"`
   102  	// Kubernetes version.
   103  	Version string `pulumi:"version"`
   104  }
   105  
   106  func LookupNodeGroupOutput(ctx *pulumi.Context, args LookupNodeGroupOutputArgs, opts ...pulumi.InvokeOption) LookupNodeGroupResultOutput {
   107  	return pulumi.ToOutputWithContext(context.Background(), args).
   108  		ApplyT(func(v interface{}) (LookupNodeGroupResult, error) {
   109  			args := v.(LookupNodeGroupArgs)
   110  			r, err := LookupNodeGroup(ctx, &args, opts...)
   111  			var s LookupNodeGroupResult
   112  			if r != nil {
   113  				s = *r
   114  			}
   115  			return s, err
   116  		}).(LookupNodeGroupResultOutput)
   117  }
   118  
   119  // A collection of arguments for invoking getNodeGroup.
   120  type LookupNodeGroupOutputArgs struct {
   121  	// Name of the cluster.
   122  	ClusterName pulumi.StringInput `pulumi:"clusterName"`
   123  	// Name of the node group.
   124  	NodeGroupName pulumi.StringInput `pulumi:"nodeGroupName"`
   125  	// Key-value map of resource tags.
   126  	Tags pulumi.StringMapInput `pulumi:"tags"`
   127  }
   128  
   129  func (LookupNodeGroupOutputArgs) ElementType() reflect.Type {
   130  	return reflect.TypeOf((*LookupNodeGroupArgs)(nil)).Elem()
   131  }
   132  
   133  // A collection of values returned by getNodeGroup.
   134  type LookupNodeGroupResultOutput struct{ *pulumi.OutputState }
   135  
   136  func (LookupNodeGroupResultOutput) ElementType() reflect.Type {
   137  	return reflect.TypeOf((*LookupNodeGroupResult)(nil)).Elem()
   138  }
   139  
   140  func (o LookupNodeGroupResultOutput) ToLookupNodeGroupResultOutput() LookupNodeGroupResultOutput {
   141  	return o
   142  }
   143  
   144  func (o LookupNodeGroupResultOutput) ToLookupNodeGroupResultOutputWithContext(ctx context.Context) LookupNodeGroupResultOutput {
   145  	return o
   146  }
   147  
   148  // Type of Amazon Machine Image (AMI) associated with the EKS Node Group.
   149  func (o LookupNodeGroupResultOutput) AmiType() pulumi.StringOutput {
   150  	return o.ApplyT(func(v LookupNodeGroupResult) string { return v.AmiType }).(pulumi.StringOutput)
   151  }
   152  
   153  // ARN of the EKS Node Group.
   154  func (o LookupNodeGroupResultOutput) Arn() pulumi.StringOutput {
   155  	return o.ApplyT(func(v LookupNodeGroupResult) string { return v.Arn }).(pulumi.StringOutput)
   156  }
   157  
   158  // Type of capacity associated with the EKS Node Group. Valid values: `ON_DEMAND`, `SPOT`.
   159  func (o LookupNodeGroupResultOutput) CapacityType() pulumi.StringOutput {
   160  	return o.ApplyT(func(v LookupNodeGroupResult) string { return v.CapacityType }).(pulumi.StringOutput)
   161  }
   162  
   163  func (o LookupNodeGroupResultOutput) ClusterName() pulumi.StringOutput {
   164  	return o.ApplyT(func(v LookupNodeGroupResult) string { return v.ClusterName }).(pulumi.StringOutput)
   165  }
   166  
   167  // Disk size in GiB for worker nodes.
   168  func (o LookupNodeGroupResultOutput) DiskSize() pulumi.IntOutput {
   169  	return o.ApplyT(func(v LookupNodeGroupResult) int { return v.DiskSize }).(pulumi.IntOutput)
   170  }
   171  
   172  // The provider-assigned unique ID for this managed resource.
   173  func (o LookupNodeGroupResultOutput) Id() pulumi.StringOutput {
   174  	return o.ApplyT(func(v LookupNodeGroupResult) string { return v.Id }).(pulumi.StringOutput)
   175  }
   176  
   177  // Set of instance types associated with the EKS Node Group.
   178  func (o LookupNodeGroupResultOutput) InstanceTypes() pulumi.StringArrayOutput {
   179  	return o.ApplyT(func(v LookupNodeGroupResult) []string { return v.InstanceTypes }).(pulumi.StringArrayOutput)
   180  }
   181  
   182  // Key-value map of Kubernetes labels. Only labels that are applied with the EKS API are managed by this argument. Other Kubernetes labels applied to the EKS Node Group will not be managed.
   183  func (o LookupNodeGroupResultOutput) Labels() pulumi.StringMapOutput {
   184  	return o.ApplyT(func(v LookupNodeGroupResult) map[string]string { return v.Labels }).(pulumi.StringMapOutput)
   185  }
   186  
   187  // Nested attribute containing information about the launch template used to create the EKS Node Group.
   188  func (o LookupNodeGroupResultOutput) LaunchTemplates() GetNodeGroupLaunchTemplateArrayOutput {
   189  	return o.ApplyT(func(v LookupNodeGroupResult) []GetNodeGroupLaunchTemplate { return v.LaunchTemplates }).(GetNodeGroupLaunchTemplateArrayOutput)
   190  }
   191  
   192  func (o LookupNodeGroupResultOutput) NodeGroupName() pulumi.StringOutput {
   193  	return o.ApplyT(func(v LookupNodeGroupResult) string { return v.NodeGroupName }).(pulumi.StringOutput)
   194  }
   195  
   196  // ARN of the IAM Role that provides permissions for the EKS Node Group.
   197  func (o LookupNodeGroupResultOutput) NodeRoleArn() pulumi.StringOutput {
   198  	return o.ApplyT(func(v LookupNodeGroupResult) string { return v.NodeRoleArn }).(pulumi.StringOutput)
   199  }
   200  
   201  // AMI version of the EKS Node Group.
   202  func (o LookupNodeGroupResultOutput) ReleaseVersion() pulumi.StringOutput {
   203  	return o.ApplyT(func(v LookupNodeGroupResult) string { return v.ReleaseVersion }).(pulumi.StringOutput)
   204  }
   205  
   206  // Configuration block with remote access settings.
   207  func (o LookupNodeGroupResultOutput) RemoteAccesses() GetNodeGroupRemoteAccessArrayOutput {
   208  	return o.ApplyT(func(v LookupNodeGroupResult) []GetNodeGroupRemoteAccess { return v.RemoteAccesses }).(GetNodeGroupRemoteAccessArrayOutput)
   209  }
   210  
   211  // List of objects containing information about underlying resources.
   212  func (o LookupNodeGroupResultOutput) Resources() GetNodeGroupResourceArrayOutput {
   213  	return o.ApplyT(func(v LookupNodeGroupResult) []GetNodeGroupResource { return v.Resources }).(GetNodeGroupResourceArrayOutput)
   214  }
   215  
   216  // Configuration block with scaling settings.
   217  func (o LookupNodeGroupResultOutput) ScalingConfigs() GetNodeGroupScalingConfigArrayOutput {
   218  	return o.ApplyT(func(v LookupNodeGroupResult) []GetNodeGroupScalingConfig { return v.ScalingConfigs }).(GetNodeGroupScalingConfigArrayOutput)
   219  }
   220  
   221  // Status of the EKS Node Group.
   222  func (o LookupNodeGroupResultOutput) Status() pulumi.StringOutput {
   223  	return o.ApplyT(func(v LookupNodeGroupResult) string { return v.Status }).(pulumi.StringOutput)
   224  }
   225  
   226  // Identifiers of EC2 Subnets to associate with the EKS Node Group.
   227  func (o LookupNodeGroupResultOutput) SubnetIds() pulumi.StringArrayOutput {
   228  	return o.ApplyT(func(v LookupNodeGroupResult) []string { return v.SubnetIds }).(pulumi.StringArrayOutput)
   229  }
   230  
   231  // Key-value map of resource tags.
   232  func (o LookupNodeGroupResultOutput) Tags() pulumi.StringMapOutput {
   233  	return o.ApplyT(func(v LookupNodeGroupResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   234  }
   235  
   236  // List of objects containing information about taints applied to the nodes in the EKS Node Group.
   237  func (o LookupNodeGroupResultOutput) Taints() GetNodeGroupTaintArrayOutput {
   238  	return o.ApplyT(func(v LookupNodeGroupResult) []GetNodeGroupTaint { return v.Taints }).(GetNodeGroupTaintArrayOutput)
   239  }
   240  
   241  // Kubernetes version.
   242  func (o LookupNodeGroupResultOutput) Version() pulumi.StringOutput {
   243  	return o.ApplyT(func(v LookupNodeGroupResult) string { return v.Version }).(pulumi.StringOutput)
   244  }
   245  
   246  func init() {
   247  	pulumi.RegisterOutputType(LookupNodeGroupResultOutput{})
   248  }