UNPKG

@pulumi/aws-native

Version:

The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)

159 lines 6.58 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Nodegroup = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource schema for AWS::EKS::Nodegroup * * ## Example Usage * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const eksNodegroup = new aws_native.eks.Nodegroup("eksNodegroup", { * clusterName: "prod", * nodeRole: "arn:aws:iam::012345678910:role/eksInstanceRole", * scalingConfig: { * minSize: 3, * desiredSize: 5, * maxSize: 7, * }, * labels: { * key1: "Value1", * key2: "Value2", * }, * subnets: [ * "subnet-6782e71e", * "subnet-e7e761ac", * ], * }); * * ``` * ### Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws_native from "@pulumi/aws-native"; * * const eksNodegroup = new aws_native.eks.Nodegroup("eksNodegroup", { * clusterName: "prod", * nodeRole: "arn:aws:iam::012345678910:role/eksInstanceRole", * scalingConfig: { * minSize: 3, * desiredSize: 5, * maxSize: 7, * }, * labels: { * key1: "Value1", * key2: "Value2", * }, * subnets: [ * "subnet-6782e71e", * "subnet-e7e761ac", * ], * }); * * ``` */ class Nodegroup extends pulumi.CustomResource { /** * Get an existing Nodegroup resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, opts) { return new Nodegroup(name, undefined, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Nodegroup. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Nodegroup.__pulumiType; } /** * Create a Nodegroup resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name, args, opts) { let resourceInputs = {}; opts = opts || {}; if (!opts.id) { if (args?.clusterName === undefined && !opts.urn) { throw new Error("Missing required property 'clusterName'"); } if (args?.nodeRole === undefined && !opts.urn) { throw new Error("Missing required property 'nodeRole'"); } if (args?.subnets === undefined && !opts.urn) { throw new Error("Missing required property 'subnets'"); } resourceInputs["amiType"] = args?.amiType; resourceInputs["capacityType"] = args?.capacityType; resourceInputs["clusterName"] = args?.clusterName; resourceInputs["diskSize"] = args?.diskSize; resourceInputs["forceUpdateEnabled"] = args?.forceUpdateEnabled; resourceInputs["instanceTypes"] = args?.instanceTypes; resourceInputs["labels"] = args?.labels; resourceInputs["launchTemplate"] = args?.launchTemplate; resourceInputs["nodeRepairConfig"] = args?.nodeRepairConfig; resourceInputs["nodeRole"] = args?.nodeRole; resourceInputs["nodegroupName"] = args?.nodegroupName; resourceInputs["releaseVersion"] = args?.releaseVersion; resourceInputs["remoteAccess"] = args?.remoteAccess; resourceInputs["scalingConfig"] = args?.scalingConfig; resourceInputs["subnets"] = args?.subnets; resourceInputs["tags"] = args?.tags; resourceInputs["taints"] = args?.taints; resourceInputs["updateConfig"] = args?.updateConfig; resourceInputs["version"] = args?.version; resourceInputs["arn"] = undefined /*out*/; resourceInputs["awsId"] = undefined /*out*/; } else { resourceInputs["amiType"] = undefined /*out*/; resourceInputs["arn"] = undefined /*out*/; resourceInputs["awsId"] = undefined /*out*/; resourceInputs["capacityType"] = undefined /*out*/; resourceInputs["clusterName"] = undefined /*out*/; resourceInputs["diskSize"] = undefined /*out*/; resourceInputs["forceUpdateEnabled"] = undefined /*out*/; resourceInputs["instanceTypes"] = undefined /*out*/; resourceInputs["labels"] = undefined /*out*/; resourceInputs["launchTemplate"] = undefined /*out*/; resourceInputs["nodeRepairConfig"] = undefined /*out*/; resourceInputs["nodeRole"] = undefined /*out*/; resourceInputs["nodegroupName"] = undefined /*out*/; resourceInputs["releaseVersion"] = undefined /*out*/; resourceInputs["remoteAccess"] = undefined /*out*/; resourceInputs["scalingConfig"] = undefined /*out*/; resourceInputs["subnets"] = undefined /*out*/; resourceInputs["tags"] = undefined /*out*/; resourceInputs["taints"] = undefined /*out*/; resourceInputs["updateConfig"] = undefined /*out*/; resourceInputs["version"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const replaceOnChanges = { replaceOnChanges: ["amiType", "capacityType", "clusterName", "diskSize", "instanceTypes[*]", "nodeRole", "nodegroupName", "remoteAccess", "subnets[*]"] }; opts = pulumi.mergeOptions(opts, replaceOnChanges); super(Nodegroup.__pulumiType, name, resourceInputs, opts); } } exports.Nodegroup = Nodegroup; /** @internal */ Nodegroup.__pulumiType = 'aws-native:eks:Nodegroup'; //# sourceMappingURL=nodegroup.js.map