import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { EvidentlyClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EvidentlyClient"; import type { CreateSegmentRequest, CreateSegmentResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link CreateSegmentCommand}. */ export interface CreateSegmentCommandInput extends CreateSegmentRequest { } /** * @public * * The output of {@link CreateSegmentCommand}. */ export interface CreateSegmentCommandOutput extends CreateSegmentResponse, __MetadataBearer { } declare const CreateSegmentCommand_base: { new (input: CreateSegmentCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: CreateSegmentCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Use this operation to define a segment of your audience. A segment is a portion of your audience that share one or more characteristics. Examples could be Chrome browser users, users in Europe, or Firefox browser users in Europe who also fit other criteria that your application collects, such as age.

Using a segment in an experiment limits that experiment to evaluate only the users who match the segment criteria. Using one or more segments in a launch allows you to define different traffic splits for the different audience segments.

For more information about segment pattern syntax, see Segment rule pattern syntax.

The pattern that you define for a segment is matched against the value of evaluationContext, which is passed into Evidently in the EvaluateFeature operation, when Evidently assigns a feature variation to a user.

* * @deprecated AWS CloudWatch Evidently has been deprecated since 11/17/2025. * @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { EvidentlyClient, CreateSegmentCommand } from "@aws-sdk/client-evidently"; // ES Modules import * // const { EvidentlyClient, CreateSegmentCommand } = require("@aws-sdk/client-evidently"); // CommonJS import * // import type { EvidentlyClientConfig } from "@aws-sdk/client-evidently"; * const config = {}; // type is EvidentlyClientConfig * const client = new EvidentlyClient(config); * const input = { // CreateSegmentRequest * name: "STRING_VALUE", // required * pattern: "STRING_VALUE", // required * description: "STRING_VALUE", * tags: { // TagMap * "": "STRING_VALUE", * }, * }; * const command = new CreateSegmentCommand(input); * const response = await client.send(command); * // { // CreateSegmentResponse * // segment: { // Segment * // arn: "STRING_VALUE", // required * // name: "STRING_VALUE", // required * // pattern: "STRING_VALUE", // required * // createdTime: new Date("TIMESTAMP"), // required * // lastUpdatedTime: new Date("TIMESTAMP"), // required * // description: "STRING_VALUE", * // experimentCount: Number("long"), * // launchCount: Number("long"), * // tags: { // TagMap * // "": "STRING_VALUE", * // }, * // }, * // }; * * ``` * * @param CreateSegmentCommandInput - {@link CreateSegmentCommandInput} * @returns {@link CreateSegmentCommandOutput} * @see {@link CreateSegmentCommandInput} for command's `input` shape. * @see {@link CreateSegmentCommandOutput} for command's `response` shape. * @see {@link EvidentlyClientResolvedConfig | config} for EvidentlyClient's `config` shape. * * @throws {@link AccessDeniedException} (client fault) *

You do not have sufficient permissions to perform this action.

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

A resource was in an inconsistent state during an update or a deletion.

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

The request would cause a service quota to be exceeded.

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

The value of a parameter in the request caused an error.

* * @throws {@link EvidentlyServiceException} *

Base exception class for all service exceptions from Evidently service.

* * * @public */ export declare class CreateSegmentCommand extends CreateSegmentCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: CreateSegmentRequest; output: CreateSegmentResponse; }; sdk: { input: CreateSegmentCommandInput; output: CreateSegmentCommandOutput; }; }; }