Skip to content

Commit

Permalink
feat(client-opensearch): This release adds support for enabling or di…
Browse files Browse the repository at this point in the history
…sabling Natural Language Query Processing feature for Amazon OpenSearch Service domains, and provides visibility into the current state of the setup or tear-down.
  • Loading branch information
awstools committed Jul 9, 2024
1 parent 1965eb0 commit 069e247
Show file tree
Hide file tree
Showing 10 changed files with 381 additions and 0 deletions.
11 changes: 11 additions & 0 deletions clients/client-opensearch/src/commands/CreateDomainCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ export interface CreateDomainCommandOutput extends CreateDomainResponse, __Metad
* SoftwareUpdateOptions: { // SoftwareUpdateOptions
* AutoSoftwareUpdateEnabled: true || false,
* },
* AIMLOptions: { // AIMLOptionsInput
* NaturalLanguageQueryGenerationOptions: { // NaturalLanguageQueryGenerationOptionsInput
* DesiredState: "ENABLED" || "DISABLED",
* },
* },
* };
* const command = new CreateDomainCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -321,6 +326,12 @@ export interface CreateDomainCommandOutput extends CreateDomainResponse, __Metad
* // ValueType: "PLAIN_TEXT" || "STRINGIFIED_JSON",
* // },
* // ],
* // AIMLOptions: { // AIMLOptionsOutput
* // NaturalLanguageQueryGenerationOptions: { // NaturalLanguageQueryGenerationOptionsOutput
* // DesiredState: "ENABLED" || "DISABLED",
* // CurrentState: "NOT_ENABLED" || "ENABLE_COMPLETE" || "ENABLE_IN_PROGRESS" || "ENABLE_FAILED" || "DISABLE_COMPLETE" || "DISABLE_IN_PROGRESS" || "DISABLE_FAILED",
* // },
* // },
* // },
* // };
*
Expand Down
6 changes: 6 additions & 0 deletions clients/client-opensearch/src/commands/DeleteDomainCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ export interface DeleteDomainCommandOutput extends DeleteDomainResponse, __Metad
* // ValueType: "PLAIN_TEXT" || "STRINGIFIED_JSON",
* // },
* // ],
* // AIMLOptions: { // AIMLOptionsOutput
* // NaturalLanguageQueryGenerationOptions: { // NaturalLanguageQueryGenerationOptionsOutput
* // DesiredState: "ENABLED" || "DISABLED",
* // CurrentState: "NOT_ENABLED" || "ENABLE_COMPLETE" || "ENABLE_IN_PROGRESS" || "ENABLE_FAILED" || "DISABLE_COMPLETE" || "DISABLE_IN_PROGRESS" || "DISABLE_FAILED",
* // },
* // },
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ export interface DescribeDomainCommandOutput extends DescribeDomainResponse, __M
* // ValueType: "PLAIN_TEXT" || "STRINGIFIED_JSON",
* // },
* // ],
* // AIMLOptions: { // AIMLOptionsOutput
* // NaturalLanguageQueryGenerationOptions: { // NaturalLanguageQueryGenerationOptionsOutput
* // DesiredState: "ENABLED" || "DISABLED",
* // CurrentState: "NOT_ENABLED" || "ENABLE_COMPLETE" || "ENABLE_IN_PROGRESS" || "ENABLE_FAILED" || "DISABLE_COMPLETE" || "DISABLE_IN_PROGRESS" || "DISABLE_FAILED",
* // },
* // },
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,15 @@ export interface DescribeDomainConfigCommandOutput extends DescribeDomainConfigR
* // ValueType: "PLAIN_TEXT" || "STRINGIFIED_JSON",
* // },
* // ],
* // AIMLOptions: { // AIMLOptionsStatus
* // Options: { // AIMLOptionsOutput
* // NaturalLanguageQueryGenerationOptions: { // NaturalLanguageQueryGenerationOptionsOutput
* // DesiredState: "ENABLED" || "DISABLED",
* // CurrentState: "NOT_ENABLED" || "ENABLE_COMPLETE" || "ENABLE_IN_PROGRESS" || "ENABLE_FAILED" || "DISABLE_COMPLETE" || "DISABLE_IN_PROGRESS" || "DISABLE_FAILED",
* // },
* // },
* // Status: "<OptionStatus>",
* // },
* // },
* // };
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ export interface DescribeDomainsCommandOutput extends DescribeDomainsResponse, _
* // ValueType: "PLAIN_TEXT" || "STRINGIFIED_JSON",
* // },
* // ],
* // AIMLOptions: { // AIMLOptionsOutput
* // NaturalLanguageQueryGenerationOptions: { // NaturalLanguageQueryGenerationOptionsOutput
* // DesiredState: "ENABLED" || "DISABLED",
* // CurrentState: "NOT_ENABLED" || "ENABLE_COMPLETE" || "ENABLE_IN_PROGRESS" || "ENABLE_FAILED" || "DISABLE_COMPLETE" || "DISABLE_IN_PROGRESS" || "DISABLE_FAILED",
* // },
* // },
* // },
* // ],
* // };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ export interface DescribeDryRunProgressCommandOutput extends DescribeDryRunProgr
* // ValueType: "PLAIN_TEXT" || "STRINGIFIED_JSON",
* // },
* // ],
* // AIMLOptions: { // AIMLOptionsOutput
* // NaturalLanguageQueryGenerationOptions: { // NaturalLanguageQueryGenerationOptionsOutput
* // DesiredState: "ENABLED" || "DISABLED",
* // CurrentState: "NOT_ENABLED" || "ENABLE_COMPLETE" || "ENABLE_IN_PROGRESS" || "ENABLE_FAILED" || "DISABLE_COMPLETE" || "DISABLE_IN_PROGRESS" || "DISABLE_FAILED",
* // },
* // },
* // },
* // DryRunResults: { // DryRunResults
* // DeploymentType: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@ export interface UpdateDomainConfigCommandOutput extends UpdateDomainConfigRespo
* SoftwareUpdateOptions: { // SoftwareUpdateOptions
* AutoSoftwareUpdateEnabled: true || false,
* },
* AIMLOptions: { // AIMLOptionsInput
* NaturalLanguageQueryGenerationOptions: { // NaturalLanguageQueryGenerationOptionsInput
* DesiredState: "ENABLED" || "DISABLED",
* },
* },
* };
* const command = new UpdateDomainConfigCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -396,6 +401,15 @@ export interface UpdateDomainConfigCommandOutput extends UpdateDomainConfigRespo
* // ValueType: "PLAIN_TEXT" || "STRINGIFIED_JSON",
* // },
* // ],
* // AIMLOptions: { // AIMLOptionsStatus
* // Options: { // AIMLOptionsOutput
* // NaturalLanguageQueryGenerationOptions: { // NaturalLanguageQueryGenerationOptionsOutput
* // DesiredState: "ENABLED" || "DISABLED",
* // CurrentState: "NOT_ENABLED" || "ENABLE_COMPLETE" || "ENABLE_IN_PROGRESS" || "ENABLE_FAILED" || "DISABLE_COMPLETE" || "DISABLE_IN_PROGRESS" || "DISABLE_FAILED",
* // },
* // },
* // Status: "<OptionStatus>",
* // },
* // },
* // DryRunResults: { // DryRunResults
* // DeploymentType: "STRING_VALUE",
Expand Down
131 changes: 131 additions & 0 deletions clients/client-opensearch/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,113 @@ export interface AdvancedSecurityOptionsStatus {
Status: OptionStatus | undefined;
}

/**
* @public
* @enum
*/
export const NaturalLanguageQueryGenerationDesiredState = {
Disabled: "DISABLED",
Enabled: "ENABLED",
} as const;

/**
* @public
*/
export type NaturalLanguageQueryGenerationDesiredState =
(typeof NaturalLanguageQueryGenerationDesiredState)[keyof typeof NaturalLanguageQueryGenerationDesiredState];

/**
* <p>Container for parameters required to enable the natural language query generation feature.</p>
* @public
*/
export interface NaturalLanguageQueryGenerationOptionsInput {
/**
* <p>The desired state of the natural language query generation feature. Valid values are ENABLED and DISABLED.</p>
* @public
*/
DesiredState?: NaturalLanguageQueryGenerationDesiredState;
}

/**
* <p>Container for parameters required to enable all machine learning features.</p>
* @public
*/
export interface AIMLOptionsInput {
/**
* <p>Container for parameters required for natural language query generation on the specified domain.</p>
* @public
*/
NaturalLanguageQueryGenerationOptions?: NaturalLanguageQueryGenerationOptionsInput;
}

/**
* @public
* @enum
*/
export const NaturalLanguageQueryGenerationCurrentState = {
DisableComplete: "DISABLE_COMPLETE",
DisableFailed: "DISABLE_FAILED",
DisableInProgress: "DISABLE_IN_PROGRESS",
EnableComplete: "ENABLE_COMPLETE",
EnableFailed: "ENABLE_FAILED",
EnableInProgress: "ENABLE_IN_PROGRESS",
NotEnabled: "NOT_ENABLED",
} as const;

/**
* @public
*/
export type NaturalLanguageQueryGenerationCurrentState =
(typeof NaturalLanguageQueryGenerationCurrentState)[keyof typeof NaturalLanguageQueryGenerationCurrentState];

/**
* <p>Container for parameters representing the state of the natural language query generation feature on the specified domain.</p>
* @public
*/
export interface NaturalLanguageQueryGenerationOptionsOutput {
/**
* <p>The desired state of the natural language query generation feature. Valid values are ENABLED and DISABLED.</p>
* @public
*/
DesiredState?: NaturalLanguageQueryGenerationDesiredState;

/**
* <p>The current state of the natural language query generation feature, indicating completion, in progress, or failure.</p>
* @public
*/
CurrentState?: NaturalLanguageQueryGenerationCurrentState;
}

/**
* <p>Container for parameters representing the state of machine learning features on the specified domain.</p>
* @public
*/
export interface AIMLOptionsOutput {
/**
* <p>Container for parameters required for natural language query generation on the specified domain.</p>
* @public
*/
NaturalLanguageQueryGenerationOptions?: NaturalLanguageQueryGenerationOptionsOutput;
}

/**
* <p>The status of machine learning options on the specified domain.</p>
* @public
*/
export interface AIMLOptionsStatus {
/**
* <p>Machine learning options on the specified domain.</p>
* @public
*/
Options?: AIMLOptionsOutput;

/**
* <p>Provides the current status of an entity.</p>
* @public
*/
Status?: OptionStatus;
}

/**
* <p>Container for the request parameters to the <code>AssociatePackage</code> operation.</p>
* @public
Expand Down Expand Up @@ -2252,6 +2359,12 @@ export interface CreateDomainRequest {
* @public
*/
SoftwareUpdateOptions?: SoftwareUpdateOptions;

/**
* <p>Options for all machine learning features for the specified domain.</p>
* @public
*/
AIMLOptions?: AIMLOptionsInput;
}

/**
Expand Down Expand Up @@ -2709,6 +2822,12 @@ export interface DomainStatus {
* @public
*/
ModifyingProperties?: ModifyingProperties[];

/**
* <p>Container for parameters required to enable all machine learning features.</p>
* @public
*/
AIMLOptions?: AIMLOptionsOutput;
}

/**
Expand Down Expand Up @@ -4314,6 +4433,12 @@ export interface DomainConfig {
* @public
*/
ModifyingProperties?: ModifyingProperties[];

/**
* <p>Container for parameters required to enable all machine learning features.</p>
* @public
*/
AIMLOptions?: AIMLOptionsStatus;
}

/**
Expand Down Expand Up @@ -7330,6 +7455,12 @@ export interface UpdateDomainConfigRequest {
* @public
*/
SoftwareUpdateOptions?: SoftwareUpdateOptions;

/**
* <p>Options for all machine learning features for the specified domain.</p>
* @public
*/
AIMLOptions?: AIMLOptionsInput;
}

/**
Expand Down
25 changes: 25 additions & 0 deletions clients/client-opensearch/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ import {
AdvancedSecurityOptions,
AdvancedSecurityOptionsInput,
AdvancedSecurityOptionsStatus,
AIMLOptionsInput,
AIMLOptionsStatus,
AutoTune,
AutoTuneDetails,
AutoTuneMaintenanceSchedule,
Expand Down Expand Up @@ -254,6 +256,7 @@ import {
LogPublishingOptionsStatus,
LogType,
MasterUserOptions,
NaturalLanguageQueryGenerationOptionsInput,
NodeToNodeEncryptionOptions,
NodeToNodeEncryptionOptionsStatus,
OffPeakWindow,
Expand Down Expand Up @@ -454,6 +457,7 @@ export const se_CreateDomainCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
AIMLOptions: (_) => _json(_),
AccessPolicies: [],
AdvancedOptions: (_) => _json(_),
AdvancedSecurityOptions: (_) => _json(_),
Expand Down Expand Up @@ -1489,6 +1493,7 @@ export const se_UpdateDomainConfigCommand = async (
let body: any;
body = JSON.stringify(
take(input, {
AIMLOptions: (_) => _json(_),
AccessPolicies: [],
AdvancedOptions: (_) => _json(_),
AdvancedSecurityOptions: (_) => _json(_),
Expand Down Expand Up @@ -3295,6 +3300,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont

// se_AdvancedSecurityOptionsInput omitted.

// se_AIMLOptionsInput omitted.

/**
* serializeAws_restJson1AutoTuneMaintenanceSchedule
*/
Expand Down Expand Up @@ -3384,6 +3391,8 @@ const se_AutoTuneOptionsInput = (input: AutoTuneOptionsInput, context: __SerdeCo

// se_MasterUserOptions omitted.

// se_NaturalLanguageQueryGenerationOptionsInput omitted.

// se_NodeToNodeEncryptionOptions omitted.

// se_OffPeakWindow omitted.
Expand Down Expand Up @@ -3468,6 +3477,18 @@ const de_AdvancedSecurityOptionsStatus = (output: any, context: __SerdeContext):
}) as any;
};

// de_AIMLOptionsOutput omitted.

/**
* deserializeAws_restJson1AIMLOptionsStatus
*/
const de_AIMLOptionsStatus = (output: any, context: __SerdeContext): AIMLOptionsStatus => {
return take(output, {
Options: _json,
Status: (_: any) => de_OptionStatus(_, context),
}) as any;
};

// de_AuthorizedPrincipal omitted.

// de_AuthorizedPrincipalList omitted.
Expand Down Expand Up @@ -3677,6 +3698,7 @@ const de_CognitoOptionsStatus = (output: any, context: __SerdeContext): CognitoO
*/
const de_DomainConfig = (output: any, context: __SerdeContext): DomainConfig => {
return take(output, {
AIMLOptions: (_: any) => de_AIMLOptionsStatus(_, context),
AccessPolicies: (_: any) => de_AccessPoliciesStatus(_, context),
AdvancedOptions: (_: any) => de_AdvancedOptionsStatus(_, context),
AdvancedSecurityOptions: (_: any) => de_AdvancedSecurityOptionsStatus(_, context),
Expand Down Expand Up @@ -3783,6 +3805,7 @@ const de_DomainPackageDetailsList = (output: any, context: __SerdeContext): Doma
*/
const de_DomainStatus = (output: any, context: __SerdeContext): DomainStatus => {
return take(output, {
AIMLOptions: _json,
ARN: __expectString,
AccessPolicies: __expectString,
AdvancedOptions: _json,
Expand Down Expand Up @@ -3924,6 +3947,8 @@ const de_LogPublishingOptionsStatus = (output: any, context: __SerdeContext): Lo

// de_ModifyingPropertiesList omitted.

// de_NaturalLanguageQueryGenerationOptionsOutput omitted.

// de_NodeToNodeEncryptionOptions omitted.

/**
Expand Down
Loading

0 comments on commit 069e247

Please sign in to comment.