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.99 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, Object.assign(Object.assign({}, 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 || args.clusterName === undefined) && !opts.urn) { throw new Error("Missing required property 'clusterName'"); } if ((!args || args.nodeRole === undefined) && !opts.urn) { throw new Error("Missing required property 'nodeRole'"); } if ((!args || args.subnets === undefined) && !opts.urn) { throw new Error("Missing required property 'subnets'"); } resourceInputs["amiType"] = args ? args.amiType : undefined; resourceInputs["capacityType"] = args ? args.capacityType : undefined; resourceInputs["clusterName"] = args ? args.clusterName : undefined; resourceInputs["diskSize"] = args ? args.diskSize : undefined; resourceInputs["forceUpdateEnabled"] = args ? args.forceUpdateEnabled : undefined; resourceInputs["instanceTypes"] = args ? args.instanceTypes : undefined; resourceInputs["labels"] = args ? args.labels : undefined; resourceInputs["launchTemplate"] = args ? args.launchTemplate : undefined; resourceInputs["nodeRepairConfig"] = args ? args.nodeRepairConfig : undefined; resourceInputs["nodeRole"] = args ? args.nodeRole : undefined; resourceInputs["nodegroupName"] = args ? args.nodegroupName : undefined; resourceInputs["releaseVersion"] = args ? args.releaseVersion : undefined; resourceInputs["remoteAccess"] = args ? args.remoteAccess : undefined; resourceInputs["scalingConfig"] = args ? args.scalingConfig : undefined; resourceInputs["subnets"] = args ? args.subnets : undefined; resourceInputs["tags"] = args ? args.tags : undefined; resourceInputs["taints"] = args ? args.taints : undefined; resourceInputs["updateConfig"] = args ? args.updateConfig : undefined; resourceInputs["version"] = args ? args.version : undefined; 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