import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { ElasticLoadBalancingV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ElasticLoadBalancingV2Client"; import type { CreateTargetGroupInput, CreateTargetGroupOutput } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CreateTargetGroupCommand}. */ export interface CreateTargetGroupCommandInput extends CreateTargetGroupInput { } /** * @public * * The output of {@link CreateTargetGroupCommand}. */ export interface CreateTargetGroupCommandOutput extends CreateTargetGroupOutput, __MetadataBearer { } declare const CreateTargetGroupCommand_base: { new (input: CreateTargetGroupCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: CreateTargetGroupCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Creates a target group.

*

For more information, see the following:

* *

This operation is idempotent, which means that it completes at most one time. If you * attempt to create multiple target groups with the same settings, each call succeeds.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { ElasticLoadBalancingV2Client, CreateTargetGroupCommand } from "@aws-sdk/client-elastic-load-balancing-v2"; // ES Modules import * // const { ElasticLoadBalancingV2Client, CreateTargetGroupCommand } = require("@aws-sdk/client-elastic-load-balancing-v2"); // CommonJS import * // import type { ElasticLoadBalancingV2ClientConfig } from "@aws-sdk/client-elastic-load-balancing-v2"; * const config = {}; // type is ElasticLoadBalancingV2ClientConfig * const client = new ElasticLoadBalancingV2Client(config); * const input = { // CreateTargetGroupInput * Name: "STRING_VALUE", // required * Protocol: "HTTP" || "HTTPS" || "TCP" || "TLS" || "UDP" || "TCP_UDP" || "GENEVE" || "QUIC" || "TCP_QUIC", * ProtocolVersion: "STRING_VALUE", * Port: Number("int"), * VpcId: "STRING_VALUE", * HealthCheckProtocol: "HTTP" || "HTTPS" || "TCP" || "TLS" || "UDP" || "TCP_UDP" || "GENEVE" || "QUIC" || "TCP_QUIC", * HealthCheckPort: "STRING_VALUE", * HealthCheckEnabled: true || false, * HealthCheckPath: "STRING_VALUE", * HealthCheckIntervalSeconds: Number("int"), * HealthCheckTimeoutSeconds: Number("int"), * HealthyThresholdCount: Number("int"), * UnhealthyThresholdCount: Number("int"), * Matcher: { // Matcher * HttpCode: "STRING_VALUE", * GrpcCode: "STRING_VALUE", * }, * TargetType: "instance" || "ip" || "lambda" || "alb", * Tags: [ // TagList * { // Tag * Key: "STRING_VALUE", // required * Value: "STRING_VALUE", * }, * ], * IpAddressType: "ipv4" || "ipv6", * TargetControlPort: Number("int"), * }; * const command = new CreateTargetGroupCommand(input); * const response = await client.send(command); * // { // CreateTargetGroupOutput * // TargetGroups: [ // TargetGroups * // { // TargetGroup * // TargetGroupArn: "STRING_VALUE", * // TargetGroupName: "STRING_VALUE", * // Protocol: "HTTP" || "HTTPS" || "TCP" || "TLS" || "UDP" || "TCP_UDP" || "GENEVE" || "QUIC" || "TCP_QUIC", * // Port: Number("int"), * // VpcId: "STRING_VALUE", * // HealthCheckProtocol: "HTTP" || "HTTPS" || "TCP" || "TLS" || "UDP" || "TCP_UDP" || "GENEVE" || "QUIC" || "TCP_QUIC", * // HealthCheckPort: "STRING_VALUE", * // HealthCheckEnabled: true || false, * // HealthCheckIntervalSeconds: Number("int"), * // HealthCheckTimeoutSeconds: Number("int"), * // HealthyThresholdCount: Number("int"), * // UnhealthyThresholdCount: Number("int"), * // HealthCheckPath: "STRING_VALUE", * // Matcher: { // Matcher * // HttpCode: "STRING_VALUE", * // GrpcCode: "STRING_VALUE", * // }, * // LoadBalancerArns: [ // LoadBalancerArns * // "STRING_VALUE", * // ], * // TargetType: "instance" || "ip" || "lambda" || "alb", * // ProtocolVersion: "STRING_VALUE", * // IpAddressType: "ipv4" || "ipv6", * // TargetControlPort: Number("int"), * // }, * // ], * // }; * * ``` * * @param CreateTargetGroupCommandInput - {@link CreateTargetGroupCommandInput} * @returns {@link CreateTargetGroupCommandOutput} * @see {@link CreateTargetGroupCommandInput} for command's `input` shape. * @see {@link CreateTargetGroupCommandOutput} for command's `response` shape. * @see {@link ElasticLoadBalancingV2ClientResolvedConfig | config} for ElasticLoadBalancingV2Client's `config` shape. * * @throws {@link DuplicateTargetGroupNameException} (client fault) *

A target group with the specified name already exists.

* * @throws {@link InvalidConfigurationRequestException} (client fault) *

The requested configuration is not valid.

* * @throws {@link TooManyTagsException} (client fault) *

You've reached the limit on the number of tags for this resource.

* * @throws {@link TooManyTargetGroupsException} (client fault) *

You've reached the limit on the number of target groups for your Amazon Web Services * account.

* * @throws {@link ElasticLoadBalancingV2ServiceException} *

Base exception class for all service exceptions from ElasticLoadBalancingV2 service.

* * * @example To create a target group * ```javascript * // This example creates a target group that you can use to route traffic to targets using HTTP on port 80. This target group uses the default health check configuration. * const input = { * Name: "my-targets", * Port: 80, * Protocol: "HTTP", * VpcId: "vpc-3ac0fb5f" * }; * const command = new CreateTargetGroupCommand(input); * const response = await client.send(command); * /* response is * { * TargetGroups: [ * { * HealthCheckIntervalSeconds: 30, * HealthCheckPath: "/", * HealthCheckPort: "traffic-port", * HealthCheckProtocol: "HTTP", * HealthCheckTimeoutSeconds: 5, * HealthyThresholdCount: 5, * Matcher: { * HttpCode: "200" * }, * Port: 80, * Protocol: "HTTP", * TargetGroupArn: "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067", * TargetGroupName: "my-targets", * UnhealthyThresholdCount: 2, * VpcId: "vpc-3ac0fb5f" * } * ] * } * *\/ * ``` * * @public */ export declare class CreateTargetGroupCommand extends CreateTargetGroupCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateTargetGroupInput; output: CreateTargetGroupOutput; }; sdk: { input: CreateTargetGroupCommandInput; output: CreateTargetGroupCommandOutput; }; }; }