Returns a list of successful and failed retrievals for the OpenSearch Serverless indexes. For more information, see Viewing data lifecycle policies.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { OpenSearchServerlessClient, BatchGetEffectiveLifecyclePolicyCommand } from "@aws-sdk/client-opensearchserverless"; // ES Modules import + * // const { OpenSearchServerlessClient, BatchGetEffectiveLifecyclePolicyCommand } = require("@aws-sdk/client-opensearchserverless"); // CommonJS import + * const client = new OpenSearchServerlessClient(config); + * const input = { // BatchGetEffectiveLifecyclePolicyRequest + * resourceIdentifiers: [ // LifecyclePolicyResourceIdentifiers // required + * { // LifecyclePolicyResourceIdentifier + * type: "STRING_VALUE", // required + * resource: "STRING_VALUE", // required + * }, + * ], + * }; + * const command = new BatchGetEffectiveLifecyclePolicyCommand(input); + * const response = await client.send(command); + * // { // BatchGetEffectiveLifecyclePolicyResponse + * // effectiveLifecyclePolicyDetails: [ // EffectiveLifecyclePolicyDetails + * // { // EffectiveLifecyclePolicyDetail + * // type: "STRING_VALUE", + * // resource: "STRING_VALUE", + * // policyName: "STRING_VALUE", + * // resourceType: "STRING_VALUE", + * // retentionPeriod: "STRING_VALUE", + * // noMinRetentionPeriod: true || false, + * // }, + * // ], + * // effectiveLifecyclePolicyErrorDetails: [ // EffectiveLifecyclePolicyErrorDetails + * // { // EffectiveLifecyclePolicyErrorDetail + * // type: "STRING_VALUE", + * // resource: "STRING_VALUE", + * // errorMessage: "STRING_VALUE", + * // errorCode: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param BatchGetEffectiveLifecyclePolicyCommandInput - {@link BatchGetEffectiveLifecyclePolicyCommandInput} + * @returns {@link BatchGetEffectiveLifecyclePolicyCommandOutput} + * @see {@link BatchGetEffectiveLifecyclePolicyCommandInput} for command's `input` shape. + * @see {@link BatchGetEffectiveLifecyclePolicyCommandOutput} for command's `response` shape. + * @see {@link OpenSearchServerlessClientResolvedConfig | config} for OpenSearchServerlessClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *Thrown when an error internal to the service occurs while processing a request.
+ * + * @throws {@link ValidationException} (client fault) + *Thrown when the HTTP request contains invalid input or is missing required + * input.
+ * + * @throws {@link OpenSearchServerlessServiceException} + *Base exception class for all service exceptions from OpenSearchServerless service.
+ * + */ +export class BatchGetEffectiveLifecyclePolicyCommand extends $Command< + BatchGetEffectiveLifecyclePolicyCommandInput, + BatchGetEffectiveLifecyclePolicyCommandOutput, + OpenSearchServerlessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: BatchGetEffectiveLifecyclePolicyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackReturns one or more configured OpenSearch Serverless lifecycle policies. For more information, see Viewing data lifecycle policies.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { OpenSearchServerlessClient, BatchGetLifecyclePolicyCommand } from "@aws-sdk/client-opensearchserverless"; // ES Modules import + * // const { OpenSearchServerlessClient, BatchGetLifecyclePolicyCommand } = require("@aws-sdk/client-opensearchserverless"); // CommonJS import + * const client = new OpenSearchServerlessClient(config); + * const input = { // BatchGetLifecyclePolicyRequest + * identifiers: [ // LifecyclePolicyIdentifiers // required + * { // LifecyclePolicyIdentifier + * type: "STRING_VALUE", // required + * name: "STRING_VALUE", // required + * }, + * ], + * }; + * const command = new BatchGetLifecyclePolicyCommand(input); + * const response = await client.send(command); + * // { // BatchGetLifecyclePolicyResponse + * // lifecyclePolicyDetails: [ // LifecyclePolicyDetails + * // { // LifecyclePolicyDetail + * // type: "STRING_VALUE", + * // name: "STRING_VALUE", + * // policyVersion: "STRING_VALUE", + * // description: "STRING_VALUE", + * // policy: "DOCUMENT_VALUE", + * // createdDate: Number("long"), + * // lastModifiedDate: Number("long"), + * // }, + * // ], + * // lifecyclePolicyErrorDetails: [ // LifecyclePolicyErrorDetails + * // { // LifecyclePolicyErrorDetail + * // type: "STRING_VALUE", + * // name: "STRING_VALUE", + * // errorMessage: "STRING_VALUE", + * // errorCode: "STRING_VALUE", + * // }, + * // ], + * // }; + * + * ``` + * + * @param BatchGetLifecyclePolicyCommandInput - {@link BatchGetLifecyclePolicyCommandInput} + * @returns {@link BatchGetLifecyclePolicyCommandOutput} + * @see {@link BatchGetLifecyclePolicyCommandInput} for command's `input` shape. + * @see {@link BatchGetLifecyclePolicyCommandOutput} for command's `response` shape. + * @see {@link OpenSearchServerlessClientResolvedConfig | config} for OpenSearchServerlessClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *Thrown when an error internal to the service occurs while processing a request.
+ * + * @throws {@link ValidationException} (client fault) + *Thrown when the HTTP request contains invalid input or is missing required + * input.
+ * + * @throws {@link OpenSearchServerlessServiceException} + *Base exception class for all service exceptions from OpenSearchServerless service.
+ * + */ +export class BatchGetLifecyclePolicyCommand extends $Command< + BatchGetLifecyclePolicyCommandInput, + BatchGetLifecyclePolicyCommandOutput, + OpenSearchServerlessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: BatchGetLifecyclePolicyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackCreates a lifecyle policy to be applied to OpenSearch Serverless indexes. Lifecycle policies define + * the number of days or hours to retain the data on an OpenSearch Serverless index. For more information, see Creating data lifecycle policies.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { OpenSearchServerlessClient, CreateLifecyclePolicyCommand } from "@aws-sdk/client-opensearchserverless"; // ES Modules import + * // const { OpenSearchServerlessClient, CreateLifecyclePolicyCommand } = require("@aws-sdk/client-opensearchserverless"); // CommonJS import + * const client = new OpenSearchServerlessClient(config); + * const input = { // CreateLifecyclePolicyRequest + * type: "STRING_VALUE", // required + * name: "STRING_VALUE", // required + * description: "STRING_VALUE", + * policy: "STRING_VALUE", // required + * clientToken: "STRING_VALUE", + * }; + * const command = new CreateLifecyclePolicyCommand(input); + * const response = await client.send(command); + * // { // CreateLifecyclePolicyResponse + * // lifecyclePolicyDetail: { // LifecyclePolicyDetail + * // type: "STRING_VALUE", + * // name: "STRING_VALUE", + * // policyVersion: "STRING_VALUE", + * // description: "STRING_VALUE", + * // policy: "DOCUMENT_VALUE", + * // createdDate: Number("long"), + * // lastModifiedDate: Number("long"), + * // }, + * // }; + * + * ``` + * + * @param CreateLifecyclePolicyCommandInput - {@link CreateLifecyclePolicyCommandInput} + * @returns {@link CreateLifecyclePolicyCommandOutput} + * @see {@link CreateLifecyclePolicyCommandInput} for command's `input` shape. + * @see {@link CreateLifecyclePolicyCommandOutput} for command's `response` shape. + * @see {@link OpenSearchServerlessClientResolvedConfig | config} for OpenSearchServerlessClient's `config` shape. + * + * @throws {@link ConflictException} (client fault) + *When creating a resource, thrown when a resource with the same name already exists + * or is being created. When deleting a resource, thrown when the resource is not in + * the ACTIVE or FAILED state.
+ * + * @throws {@link InternalServerException} (server fault) + *Thrown when an error internal to the service occurs while processing a request.
+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *Thrown when you attempt to create more resources than the service allows based on service quotas.
+ * + * @throws {@link ValidationException} (client fault) + *Thrown when the HTTP request contains invalid input or is missing required + * input.
+ * + * @throws {@link OpenSearchServerlessServiceException} + *Base exception class for all service exceptions from OpenSearchServerless service.
+ * + */ +export class CreateLifecyclePolicyCommand extends $Command< + CreateLifecyclePolicyCommandInput, + CreateLifecyclePolicyCommandOutput, + OpenSearchServerlessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: CreateLifecyclePolicyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackDeletes an OpenSearch Serverless lifecycle policy. For more information, see Deleting data lifecycle policies.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { OpenSearchServerlessClient, DeleteLifecyclePolicyCommand } from "@aws-sdk/client-opensearchserverless"; // ES Modules import + * // const { OpenSearchServerlessClient, DeleteLifecyclePolicyCommand } = require("@aws-sdk/client-opensearchserverless"); // CommonJS import + * const client = new OpenSearchServerlessClient(config); + * const input = { // DeleteLifecyclePolicyRequest + * type: "STRING_VALUE", // required + * name: "STRING_VALUE", // required + * clientToken: "STRING_VALUE", + * }; + * const command = new DeleteLifecyclePolicyCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteLifecyclePolicyCommandInput - {@link DeleteLifecyclePolicyCommandInput} + * @returns {@link DeleteLifecyclePolicyCommandOutput} + * @see {@link DeleteLifecyclePolicyCommandInput} for command's `input` shape. + * @see {@link DeleteLifecyclePolicyCommandOutput} for command's `response` shape. + * @see {@link OpenSearchServerlessClientResolvedConfig | config} for OpenSearchServerlessClient's `config` shape. + * + * @throws {@link ConflictException} (client fault) + *When creating a resource, thrown when a resource with the same name already exists + * or is being created. When deleting a resource, thrown when the resource is not in + * the ACTIVE or FAILED state.
+ * + * @throws {@link InternalServerException} (server fault) + *Thrown when an error internal to the service occurs while processing a request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when accessing or deleting a resource that does not exist.
+ * + * @throws {@link ValidationException} (client fault) + *Thrown when the HTTP request contains invalid input or is missing required + * input.
+ * + * @throws {@link OpenSearchServerlessServiceException} + *Base exception class for all service exceptions from OpenSearchServerless service.
+ * + */ +export class DeleteLifecyclePolicyCommand extends $Command< + DeleteLifecyclePolicyCommandInput, + DeleteLifecyclePolicyCommandOutput, + OpenSearchServerlessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DeleteLifecyclePolicyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackReturns a list of OpenSearch Serverless lifecycle policies. For more information, see Viewing data lifecycle policies.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { OpenSearchServerlessClient, ListLifecyclePoliciesCommand } from "@aws-sdk/client-opensearchserverless"; // ES Modules import + * // const { OpenSearchServerlessClient, ListLifecyclePoliciesCommand } = require("@aws-sdk/client-opensearchserverless"); // CommonJS import + * const client = new OpenSearchServerlessClient(config); + * const input = { // ListLifecyclePoliciesRequest + * type: "STRING_VALUE", // required + * resources: [ // LifecycleResourceFilter + * "STRING_VALUE", + * ], + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * }; + * const command = new ListLifecyclePoliciesCommand(input); + * const response = await client.send(command); + * // { // ListLifecyclePoliciesResponse + * // lifecyclePolicySummaries: [ // LifecyclePolicySummaries + * // { // LifecyclePolicySummary + * // type: "STRING_VALUE", + * // name: "STRING_VALUE", + * // policyVersion: "STRING_VALUE", + * // description: "STRING_VALUE", + * // createdDate: Number("long"), + * // lastModifiedDate: Number("long"), + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListLifecyclePoliciesCommandInput - {@link ListLifecyclePoliciesCommandInput} + * @returns {@link ListLifecyclePoliciesCommandOutput} + * @see {@link ListLifecyclePoliciesCommandInput} for command's `input` shape. + * @see {@link ListLifecyclePoliciesCommandOutput} for command's `response` shape. + * @see {@link OpenSearchServerlessClientResolvedConfig | config} for OpenSearchServerlessClient's `config` shape. + * + * @throws {@link InternalServerException} (server fault) + *Thrown when an error internal to the service occurs while processing a request.
+ * + * @throws {@link ValidationException} (client fault) + *Thrown when the HTTP request contains invalid input or is missing required + * input.
+ * + * @throws {@link OpenSearchServerlessServiceException} + *Base exception class for all service exceptions from OpenSearchServerless service.
+ * + */ +export class ListLifecyclePoliciesCommand extends $Command< + ListLifecyclePoliciesCommandInput, + ListLifecyclePoliciesCommandOutput, + OpenSearchServerlessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: ListLifecyclePoliciesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackUpdates an OpenSearch Serverless access policy. For more information, see Updating data lifecycle policies.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { OpenSearchServerlessClient, UpdateLifecyclePolicyCommand } from "@aws-sdk/client-opensearchserverless"; // ES Modules import + * // const { OpenSearchServerlessClient, UpdateLifecyclePolicyCommand } = require("@aws-sdk/client-opensearchserverless"); // CommonJS import + * const client = new OpenSearchServerlessClient(config); + * const input = { // UpdateLifecyclePolicyRequest + * type: "STRING_VALUE", // required + * name: "STRING_VALUE", // required + * policyVersion: "STRING_VALUE", // required + * description: "STRING_VALUE", + * policy: "STRING_VALUE", + * clientToken: "STRING_VALUE", + * }; + * const command = new UpdateLifecyclePolicyCommand(input); + * const response = await client.send(command); + * // { // UpdateLifecyclePolicyResponse + * // lifecyclePolicyDetail: { // LifecyclePolicyDetail + * // type: "STRING_VALUE", + * // name: "STRING_VALUE", + * // policyVersion: "STRING_VALUE", + * // description: "STRING_VALUE", + * // policy: "DOCUMENT_VALUE", + * // createdDate: Number("long"), + * // lastModifiedDate: Number("long"), + * // }, + * // }; + * + * ``` + * + * @param UpdateLifecyclePolicyCommandInput - {@link UpdateLifecyclePolicyCommandInput} + * @returns {@link UpdateLifecyclePolicyCommandOutput} + * @see {@link UpdateLifecyclePolicyCommandInput} for command's `input` shape. + * @see {@link UpdateLifecyclePolicyCommandOutput} for command's `response` shape. + * @see {@link OpenSearchServerlessClientResolvedConfig | config} for OpenSearchServerlessClient's `config` shape. + * + * @throws {@link ConflictException} (client fault) + *When creating a resource, thrown when a resource with the same name already exists + * or is being created. When deleting a resource, thrown when the resource is not in + * the ACTIVE or FAILED state.
+ * + * @throws {@link InternalServerException} (server fault) + *Thrown when an error internal to the service occurs while processing a request.
+ * + * @throws {@link ResourceNotFoundException} (client fault) + *Thrown when accessing or deleting a resource that does not exist.
+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *Thrown when you attempt to create more resources than the service allows based on service quotas.
+ * + * @throws {@link ValidationException} (client fault) + *Thrown when the HTTP request contains invalid input or is missing required + * input.
+ * + * @throws {@link OpenSearchServerlessServiceException} + *Base exception class for all service exceptions from OpenSearchServerless service.
+ * + */ +export class UpdateLifecyclePolicyCommand extends $Command< + UpdateLifecyclePolicyCommandInput, + UpdateLifecyclePolicyCommandOutput, + OpenSearchServerlessClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: UpdateLifecyclePolicyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackTye type of policy. Currently the only supported value is data
.
Tye type of policy. Currently, the only supported value is data
.
The type of access policy. Currently the only available type is data
.
The type of access policy. Currently, the only available type is data
.
The unique identifiers of policy types and resource names.
+ */ +export interface LifecyclePolicyResourceIdentifier { + /** + * @public + *The type of lifecycle policy.
+ */ + type: LifecyclePolicyType | undefined; + + /** + * @public + *The name of the OpenSearch Serverless ilndex resource.
+ */ + resource: string | undefined; +} + +/** + * @public + */ +export interface BatchGetEffectiveLifecyclePolicyRequest { + /** + * @public + *The unique identifiers of policy types and resource names.
+ */ + resourceIdentifiers: LifecyclePolicyResourceIdentifier[] | undefined; +} + +/** + * @public + * @enum + */ +export const ResourceType = { + /** + * index resource type + */ + index: "index", +} as const; + +/** + * @public + */ +export type ResourceType = (typeof ResourceType)[keyof typeof ResourceType]; + +/** + * @public + *Error information for an OpenSearch Serverless request.
+ */ +export interface EffectiveLifecyclePolicyDetail { + /** + * @public + *The type of lifecycle policy.
+ */ + type?: LifecyclePolicyType; + + /** + * @public + *The name of the OpenSearch Serverless index resource.
+ */ + resource?: string; + + /** + * @public + *The name of the lifecycle policy.
+ */ + policyName?: string; + + /** + * @public + *The type of OpenSearch Serverless resource. Currently, the only supported resource is index
.
The minimum number of index retention in days or hours. This is an optional parameter that will return only if it’s set.
+ */ + retentionPeriod?: string; + + /** + * @public + *The minimum number of index retention days set. That is an optional param that will return as true
if the minimum number of days or
+ * hours is not set to a index resource.
Error information for an OpenSearch Serverless request.
+ */ +export interface EffectiveLifecyclePolicyErrorDetail { + /** + * @public + *The type of lifecycle policy.
+ */ + type?: LifecyclePolicyType; + + /** + * @public + *The name of OpenSearch Serverless index resource.
+ */ + resource?: string; + + /** + * @public + *A description of the error. For example, The specified Index resource is not found
.
The error code for the request.
+ */ + errorCode?: string; +} + +/** + * @public + */ +export interface BatchGetEffectiveLifecyclePolicyResponse { + /** + * @public + *A list of lifecycle policies applied to the OpenSearch Serverless indexes.
+ */ + effectiveLifecyclePolicyDetails?: EffectiveLifecyclePolicyDetail[]; + + /** + * @public + *A list of resources for which retrieval failed.
+ */ + effectiveLifecyclePolicyErrorDetails?: EffectiveLifecyclePolicyErrorDetail[]; +} + +/** + * @public + *The unique identifiers of policy types and policy names.
+ */ +export interface LifecyclePolicyIdentifier { + /** + * @public + *The type of lifecycle policy.
+ */ + type: LifecyclePolicyType | undefined; + + /** + * @public + *The name of the lifecycle policy.
+ */ + name: string | undefined; +} + +/** + * @public + */ +export interface BatchGetLifecyclePolicyRequest { + /** + * @public + *The unique identifiers of policy types and policy names.
+ */ + identifiers: LifecyclePolicyIdentifier[] | undefined; +} + +/** + * @public + *Details about an OpenSearch Serverless lifecycle policy.
+ */ +export interface LifecyclePolicyDetail { + /** + * @public + *The type of lifecycle policy.
+ */ + type?: LifecyclePolicyType; + + /** + * @public + *The name of the lifecycle policy.
+ */ + name?: string; + + /** + * @public + *The version of the lifecycle policy.
+ */ + policyVersion?: string; + + /** + * @public + *The description of the lifecycle policy.
+ */ + description?: string; + + /** + * @public + *The JSON policy document without any whitespaces.
+ */ + policy?: __DocumentType; + + /** + * @public + *The date the lifecycle policy was created.
+ */ + createdDate?: number; + + /** + * @public + *The timestamp of when the lifecycle policy was last modified.
+ */ + lastModifiedDate?: number; +} + +/** + * @public + *Error information for an OpenSearch Serverless request.
+ */ +export interface LifecyclePolicyErrorDetail { + /** + * @public + *The type of lifecycle policy.
+ */ + type?: LifecyclePolicyType; + + /** + * @public + *The name of the lifecycle policy.
+ */ + name?: string; + + /** + * @public + *A description of the error. For example, The specified Lifecycle Policy is not found
.
The error code for the request. For example, NOT_FOUND
.
A list of lifecycle policies matched to the input policy name and policy type.
+ */ + lifecyclePolicyDetails?: LifecyclePolicyDetail[]; + + /** + * @public + *A list of lifecycle policy names and policy types for which retrieval failed.
+ */ + lifecyclePolicyErrorDetails?: LifecyclePolicyErrorDetail[]; +} + /** * @public */ @@ -1020,7 +1295,7 @@ export interface DeleteCollectionResponse { /** * @public - *List of filter keys that you can use for LIST, UPDATE, and DELETE requests to OpenSearch Serverless + *
A list of filter keys that you can use for LIST, UPDATE, and DELETE requests to OpenSearch Serverless * collections.
*/ export interface CollectionFilters { @@ -1043,7 +1318,7 @@ export interface CollectionFilters { export interface ListCollectionsRequest { /** * @public - *List of filter names and values that you can use for requests.
+ *A list of filter names and values that you can use for requests.
*/ collectionFilters?: CollectionFilters; @@ -1200,6 +1475,52 @@ export interface UpdateCollectionResponse { updateCollectionDetail?: UpdateCollectionDetail; } +/** + * @public + */ +export interface CreateLifecyclePolicyRequest { + /** + * @public + *The type of lifecycle policy.
+ */ + type: LifecyclePolicyType | undefined; + + /** + * @public + *The name of the lifecycle policy.
+ */ + name: string | undefined; + + /** + * @public + *A description of the lifecycle policy.
+ */ + description?: string; + + /** + * @public + *The JSON policy document to use as the content for the lifecycle policy.
+ */ + policy: string | undefined; + + /** + * @public + *A unique, case-sensitive identifier to ensure idempotency of the request.
+ */ + clientToken?: string; +} + +/** + * @public + */ +export interface CreateLifecyclePolicyResponse { + /** + * @public + *Details about the created lifecycle policy.
+ */ + lifecyclePolicyDetail?: LifecyclePolicyDetail; +} + /** * @public *Describes SAML options for an OpenSearch Serverless security configuration in the form of a key-value @@ -1529,6 +1850,34 @@ export interface CreateVpcEndpointResponse { createVpcEndpointDetail?: CreateVpcEndpointDetail; } +/** + * @public + */ +export interface DeleteLifecyclePolicyRequest { + /** + * @public + *
The type of lifecycle policy.
+ */ + type: LifecyclePolicyType | undefined; + + /** + * @public + *The name of the policy to delete.
+ */ + name: string | undefined; + + /** + * @public + *Unique, case-sensitive identifier to ensure idempotency of the request.
+ */ + clientToken?: string; +} + +/** + * @public + */ +export interface DeleteLifecyclePolicyResponse {} + /** * @public */ @@ -1654,6 +2003,18 @@ export interface GetAccountSettingsResponse { */ export interface GetPoliciesStatsRequest {} +/** + * @public + *Statistics for an OpenSearch Serverless lifecycle policy.
+ */ +export interface LifecyclePolicyStats { + /** + * @public + *The number of retention lifecycle policies in the current account.
+ */ + RetentionPolicyCount?: number; +} + /** * @public *Statistics for an OpenSearch Serverless security configuration.
@@ -1706,6 +2067,12 @@ export interface GetPoliciesStatsResponse { */ SecurityConfigStats?: SecurityConfigStats; + /** + * @public + *Information about the lifecycle policies in your account.
+ */ + LifecyclePolicyStats?: LifecyclePolicyStats; + /** * @public *The total number of OpenSearch Serverless security policies and configurations in your @@ -1764,6 +2131,146 @@ export interface GetSecurityPolicyResponse { securityPolicyDetail?: SecurityPolicyDetail; } +/** + * @public + */ +export interface ListLifecyclePoliciesRequest { + /** + * @public + *
The type of lifecycle policy.
+ */ + type: LifecyclePolicyType | undefined; + + /** + * @public + *Resource filters that policies can apply to. Currently, the only supported resource type is index
.
If your initial ListLifecyclePolicies
operation returns a nextToken
, you can include the returned nextToken
in subsequent ListLifecyclePolicies
operations, which returns results in the next page.
An optional parameter that specifies the maximum number of results to return. You can use use nextToken
to get the next page of results. The default is 10.
A summary of the lifecycle policy.
+ */ +export interface LifecyclePolicySummary { + /** + * @public + *The type of lifecycle policy.
+ */ + type?: LifecyclePolicyType; + + /** + * @public + *The name of the lifecycle policy.
+ */ + name?: string; + + /** + * @public + *The version of the lifecycle policy.
+ */ + policyVersion?: string; + + /** + * @public + *The description of the lifecycle policy.
+ */ + description?: string; + + /** + * @public + *The Epoch time when the lifecycle policy was created.
+ */ + createdDate?: number; + + /** + * @public + *The date and time when the lifecycle policy was last modified.
+ */ + lastModifiedDate?: number; +} + +/** + * @public + */ +export interface ListLifecyclePoliciesResponse { + /** + * @public + *Details about the requested lifecycle policies.
+ */ + lifecyclePolicySummaries?: LifecyclePolicySummary[]; + + /** + * @public + *When nextToken
is returned, there are more results available. The value of nextToken
is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
The type of lifecycle policy.
+ */ + type: LifecyclePolicyType | undefined; + + /** + * @public + *The name of the policy.
+ */ + name: string | undefined; + + /** + * @public + *The version of the policy being updated.
+ */ + policyVersion: string | undefined; + + /** + * @public + *A description of the lifecycle policy.
+ */ + description?: string; + + /** + * @public + *The JSON policy document to use as the content for the lifecycle policy.
+ */ + policy?: string; + + /** + * @public + *A unique, case-sensitive identifier to ensure idempotency of the request.
+ */ + clientToken?: string; +} + +/** + * @public + */ +export interface UpdateLifecyclePolicyResponse { + /** + * @public + *Details about the updated lifecycle policy.
+ */ + lifecyclePolicyDetail?: LifecyclePolicyDetail; +} + /** * @public */ diff --git a/clients/client-opensearchserverless/src/pagination/ListLifecyclePoliciesPaginator.ts b/clients/client-opensearchserverless/src/pagination/ListLifecyclePoliciesPaginator.ts new file mode 100644 index 000000000000..afbffbf69be7 --- /dev/null +++ b/clients/client-opensearchserverless/src/pagination/ListLifecyclePoliciesPaginator.ts @@ -0,0 +1,49 @@ +// smithy-typescript generated code +import { Paginator } from "@smithy/types"; + +import { + ListLifecyclePoliciesCommand, + ListLifecyclePoliciesCommandInput, + ListLifecyclePoliciesCommandOutput, +} from "../commands/ListLifecyclePoliciesCommand"; +import { OpenSearchServerlessClient } from "../OpenSearchServerlessClient"; +import { OpenSearchServerlessPaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: OpenSearchServerlessClient, + input: ListLifecyclePoliciesCommandInput, + ...args: any +): PromiseThe type of access policy. Currently the only available type is data
.
The type of access policy. Currently, the only available type is data
.
Returns a list of successful and failed retrievals for the OpenSearch Serverless indexes. For more information, see Viewing data lifecycle policies.
", + "smithy.api#readonly": {} + } + }, + "com.amazonaws.opensearchserverless#BatchGetEffectiveLifecyclePolicyRequest": { + "type": "structure", + "members": { + "resourceIdentifiers": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyResourceIdentifiers", + "traits": { + "smithy.api#documentation": "The unique identifiers of policy types and resource names.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.opensearchserverless#BatchGetEffectiveLifecyclePolicyResponse": { + "type": "structure", + "members": { + "effectiveLifecyclePolicyDetails": { + "target": "com.amazonaws.opensearchserverless#EffectiveLifecyclePolicyDetails", + "traits": { + "smithy.api#documentation": "A list of lifecycle policies applied to the OpenSearch Serverless indexes.
" + } + }, + "effectiveLifecyclePolicyErrorDetails": { + "target": "com.amazonaws.opensearchserverless#EffectiveLifecyclePolicyErrorDetails", + "traits": { + "smithy.api#documentation": "A list of resources for which retrieval failed.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, + "com.amazonaws.opensearchserverless#BatchGetLifecyclePolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearchserverless#BatchGetLifecyclePolicyRequest" + }, + "output": { + "target": "com.amazonaws.opensearchserverless#BatchGetLifecyclePolicyResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearchserverless#InternalServerException" + }, + { + "target": "com.amazonaws.opensearchserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Returns one or more configured OpenSearch Serverless lifecycle policies. For more information, see Viewing data lifecycle policies.
", + "smithy.api#readonly": {} + } + }, + "com.amazonaws.opensearchserverless#BatchGetLifecyclePolicyRequest": { + "type": "structure", + "members": { + "identifiers": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyIdentifiers", + "traits": { + "smithy.api#documentation": "The unique identifiers of policy types and policy names.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.opensearchserverless#BatchGetLifecyclePolicyResponse": { + "type": "structure", + "members": { + "lifecyclePolicyDetails": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyDetails", + "traits": { + "smithy.api#documentation": "A list of lifecycle policies matched to the input policy name and policy type.
" + } + }, + "lifecyclePolicyErrorDetails": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyErrorDetails", + "traits": { + "smithy.api#documentation": "A list of lifecycle policy names and policy types for which retrieval failed.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.opensearchserverless#BatchGetVpcEndpoint": { "type": "operation", "input": { @@ -475,7 +587,7 @@ } }, "traits": { - "smithy.api#documentation": "List of filter keys that you can use for LIST, UPDATE, and DELETE requests to OpenSearch Serverless\n collections.
" + "smithy.api#documentation": "A list of filter keys that you can use for LIST, UPDATE, and DELETE requests to OpenSearch Serverless\n collections.
" } }, "com.amazonaws.opensearchserverless#CollectionId": { @@ -863,6 +975,90 @@ } } }, + "com.amazonaws.opensearchserverless#CreateLifecyclePolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearchserverless#CreateLifecyclePolicyRequest" + }, + "output": { + "target": "com.amazonaws.opensearchserverless#CreateLifecyclePolicyResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearchserverless#ConflictException" + }, + { + "target": "com.amazonaws.opensearchserverless#InternalServerException" + }, + { + "target": "com.amazonaws.opensearchserverless#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.opensearchserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Creates a lifecyle policy to be applied to OpenSearch Serverless indexes. Lifecycle policies define\n the number of days or hours to retain the data on an OpenSearch Serverless index. For more information, see Creating data lifecycle policies.
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.opensearchserverless#CreateLifecyclePolicyRequest": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyType", + "traits": { + "smithy.api#documentation": "The type of lifecycle policy.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.opensearchserverless#PolicyName", + "traits": { + "smithy.api#documentation": "The name of the lifecycle policy.
", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.opensearchserverless#PolicyDescription", + "traits": { + "smithy.api#documentation": "A description of the lifecycle policy.
" + } + }, + "policy": { + "target": "com.amazonaws.opensearchserverless#PolicyDocument", + "traits": { + "smithy.api#documentation": "The JSON policy document to use as the content for the lifecycle policy.
", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.opensearchserverless#ClientToken", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "A unique, case-sensitive identifier to ensure idempotency of the request.
", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.opensearchserverless#CreateLifecyclePolicyResponse": { + "type": "structure", + "members": { + "lifecyclePolicyDetail": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyDetail", + "traits": { + "smithy.api#documentation": "Details about the created lifecycle policy.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.opensearchserverless#CreateSecurityConfig": { "type": "operation", "input": { @@ -1263,6 +1459,70 @@ } } }, + "com.amazonaws.opensearchserverless#DeleteLifecyclePolicy": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearchserverless#DeleteLifecyclePolicyRequest" + }, + "output": { + "target": "com.amazonaws.opensearchserverless#DeleteLifecyclePolicyResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearchserverless#ConflictException" + }, + { + "target": "com.amazonaws.opensearchserverless#InternalServerException" + }, + { + "target": "com.amazonaws.opensearchserverless#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.opensearchserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Deletes an OpenSearch Serverless lifecycle policy. For more information, see Deleting data lifecycle policies.
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.opensearchserverless#DeleteLifecyclePolicyRequest": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyType", + "traits": { + "smithy.api#documentation": "The type of lifecycle policy.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.opensearchserverless#PolicyName", + "traits": { + "smithy.api#documentation": "The name of the policy to delete.
", + "smithy.api#required": {} + } + }, + "clientToken": { + "target": "com.amazonaws.opensearchserverless#ClientToken", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "Unique, case-sensitive identifier to ensure idempotency of the request.
", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.opensearchserverless#DeleteLifecyclePolicyResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.opensearchserverless#DeleteSecurityConfig": { "type": "operation", "input": { @@ -1456,6 +1716,94 @@ } } }, + "com.amazonaws.opensearchserverless#EffectiveLifecyclePolicyDetail": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyType", + "traits": { + "smithy.api#documentation": "The type of lifecycle policy.
" + } + }, + "resource": { + "target": "com.amazonaws.opensearchserverless#Resource", + "traits": { + "smithy.api#documentation": "The name of the OpenSearch Serverless index resource.
" + } + }, + "policyName": { + "target": "com.amazonaws.opensearchserverless#PolicyName", + "traits": { + "smithy.api#documentation": "The name of the lifecycle policy.
" + } + }, + "resourceType": { + "target": "com.amazonaws.opensearchserverless#ResourceType", + "traits": { + "smithy.api#documentation": "The type of OpenSearch Serverless resource. Currently, the only supported resource is index
.
The minimum number of index retention in days or hours. This is an optional parameter that will return only if it’s set.
" + } + }, + "noMinRetentionPeriod": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "The minimum number of index retention days set. That is an optional param that will return as true
if the minimum number of days or \n hours is not set to a index resource.
Error information for an OpenSearch Serverless request.
" + } + }, + "com.amazonaws.opensearchserverless#EffectiveLifecyclePolicyDetails": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearchserverless#EffectiveLifecyclePolicyDetail" + } + }, + "com.amazonaws.opensearchserverless#EffectiveLifecyclePolicyErrorDetail": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyType", + "traits": { + "smithy.api#documentation": "The type of lifecycle policy.
" + } + }, + "resource": { + "target": "com.amazonaws.opensearchserverless#Resource", + "traits": { + "smithy.api#documentation": "The name of OpenSearch Serverless index resource.
" + } + }, + "errorMessage": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the error. For example, The specified Index resource is not found
.
The error code for the request.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Error information for an OpenSearch Serverless request.
" + } + }, + "com.amazonaws.opensearchserverless#EffectiveLifecyclePolicyErrorDetails": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearchserverless#EffectiveLifecyclePolicyErrorDetail" + } + }, "com.amazonaws.opensearchserverless#GetAccessPolicy": { "type": "operation", "input": { @@ -1486,7 +1834,7 @@ "type": { "target": "com.amazonaws.opensearchserverless#AccessPolicyType", "traits": { - "smithy.api#documentation": "Tye type of policy. Currently the only supported value is data
.
Tye type of policy. Currently, the only supported value is data
.
Information about the security configurations in your account.
" } }, + "LifecyclePolicyStats": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyStats", + "traits": { + "smithy.api#documentation": "Information about the lifecycle policies in your account.
" + } + }, "TotalPolicyCount": { "target": "smithy.api#Long", "traits": { @@ -1664,59 +2018,331 @@ } ], "traits": { - "smithy.api#documentation": "Returns information about a configured OpenSearch Serverless security policy. For more information, see Network access\n for Amazon OpenSearch Serverless and Encryption at\n rest for Amazon OpenSearch Serverless.
", - "smithy.api#readonly": {} + "smithy.api#documentation": "Returns information about a configured OpenSearch Serverless security policy. For more information, see Network access\n for Amazon OpenSearch Serverless and Encryption at\n rest for Amazon OpenSearch Serverless.
", + "smithy.api#readonly": {} + } + }, + "com.amazonaws.opensearchserverless#GetSecurityPolicyRequest": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.opensearchserverless#SecurityPolicyType", + "traits": { + "smithy.api#documentation": "The type of security policy.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.opensearchserverless#PolicyName", + "traits": { + "smithy.api#documentation": "The name of the security policy.
", + "smithy.api#required": {} + } + } + } + }, + "com.amazonaws.opensearchserverless#GetSecurityPolicyResponse": { + "type": "structure", + "members": { + "securityPolicyDetail": { + "target": "com.amazonaws.opensearchserverless#SecurityPolicyDetail", + "traits": { + "smithy.api#documentation": "Details about the requested security policy.
" + } + } + } + }, + "com.amazonaws.opensearchserverless#IndexingCapacityValue": { + "type": "integer", + "traits": { + "smithy.api#range": { + "min": 2 + } + } + }, + "com.amazonaws.opensearchserverless#InternalServerException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "Thrown when an error internal to the service occurs while processing a request.
", + "smithy.api#error": "server", + "smithy.api#httpError": 500 + } + }, + "com.amazonaws.opensearchserverless#LifecyclePolicy": { + "type": "resource", + "identifiers": { + "type": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyType" + }, + "name": { + "target": "com.amazonaws.opensearchserverless#PolicyName" + } + }, + "update": { + "target": "com.amazonaws.opensearchserverless#UpdateLifecyclePolicy" + }, + "delete": { + "target": "com.amazonaws.opensearchserverless#DeleteLifecyclePolicy" + }, + "list": { + "target": "com.amazonaws.opensearchserverless#ListLifecyclePolicies" + }, + "traits": { + "aws.cloudformation#cfnResource": { + "name": "LifecyclePolicy" + } + } + }, + "com.amazonaws.opensearchserverless#LifecyclePolicyDetail": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyType", + "traits": { + "smithy.api#documentation": "The type of lifecycle policy.
" + } + }, + "name": { + "target": "com.amazonaws.opensearchserverless#PolicyName", + "traits": { + "smithy.api#documentation": "The name of the lifecycle policy.
" + } + }, + "policyVersion": { + "target": "com.amazonaws.opensearchserverless#PolicyVersion", + "traits": { + "smithy.api#documentation": "The version of the lifecycle policy.
" + } + }, + "description": { + "target": "com.amazonaws.opensearchserverless#PolicyDescription", + "traits": { + "smithy.api#documentation": "The description of the lifecycle policy.
" + } + }, + "policy": { + "target": "smithy.api#Document", + "traits": { + "smithy.api#documentation": "The JSON policy document without any whitespaces.
" + } + }, + "createdDate": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The date the lifecycle policy was created.
" + } + }, + "lastModifiedDate": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The timestamp of when the lifecycle policy was last modified.
" + } + } + }, + "traits": { + "smithy.api#documentation": "Details about an OpenSearch Serverless lifecycle policy.
" + } + }, + "com.amazonaws.opensearchserverless#LifecyclePolicyDetails": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyDetail" + } + }, + "com.amazonaws.opensearchserverless#LifecyclePolicyErrorDetail": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyType", + "traits": { + "smithy.api#documentation": "The type of lifecycle policy.
" + } + }, + "name": { + "target": "com.amazonaws.opensearchserverless#PolicyName", + "traits": { + "smithy.api#documentation": "The name of the lifecycle policy.
" + } + }, + "errorMessage": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "A description of the error. For example, The specified Lifecycle Policy is not found
.
The error code for the request. For example, NOT_FOUND
.
Error information for an OpenSearch Serverless request.
" + } + }, + "com.amazonaws.opensearchserverless#LifecyclePolicyErrorDetails": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyErrorDetail" + } + }, + "com.amazonaws.opensearchserverless#LifecyclePolicyIdentifier": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyType", + "traits": { + "smithy.api#documentation": "The type of lifecycle policy.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.opensearchserverless#PolicyName", + "traits": { + "smithy.api#documentation": "The name of the lifecycle policy.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "The unique identifiers of policy types and policy names.
" + } + }, + "com.amazonaws.opensearchserverless#LifecyclePolicyIdentifiers": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyIdentifier" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 40 + } } }, - "com.amazonaws.opensearchserverless#GetSecurityPolicyRequest": { + "com.amazonaws.opensearchserverless#LifecyclePolicyResourceIdentifier": { "type": "structure", "members": { "type": { - "target": "com.amazonaws.opensearchserverless#SecurityPolicyType", + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyType", "traits": { - "smithy.api#documentation": "The type of security policy.
", + "smithy.api#documentation": "The type of lifecycle policy.
", "smithy.api#required": {} } }, - "name": { - "target": "com.amazonaws.opensearchserverless#PolicyName", + "resource": { + "target": "com.amazonaws.opensearchserverless#ResourceName", "traits": { - "smithy.api#documentation": "The name of the security policy.
", + "smithy.api#documentation": "The name of the OpenSearch Serverless ilndex resource.
", "smithy.api#required": {} } } + }, + "traits": { + "smithy.api#documentation": "The unique identifiers of policy types and resource names.
" + } + }, + "com.amazonaws.opensearchserverless#LifecyclePolicyResourceIdentifiers": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyResourceIdentifier" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 100 + } } }, - "com.amazonaws.opensearchserverless#GetSecurityPolicyResponse": { + "com.amazonaws.opensearchserverless#LifecyclePolicyStats": { "type": "structure", "members": { - "securityPolicyDetail": { - "target": "com.amazonaws.opensearchserverless#SecurityPolicyDetail", + "RetentionPolicyCount": { + "target": "smithy.api#Long", "traits": { - "smithy.api#documentation": "Details about the requested security policy.
" + "smithy.api#documentation": "The number of retention lifecycle policies in the current account.
" } } + }, + "traits": { + "smithy.api#documentation": "Statistics for an OpenSearch Serverless lifecycle policy.
" } }, - "com.amazonaws.opensearchserverless#IndexingCapacityValue": { - "type": "integer", - "traits": { - "smithy.api#range": { - "min": 2 - } + "com.amazonaws.opensearchserverless#LifecyclePolicySummaries": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicySummary" } }, - "com.amazonaws.opensearchserverless#InternalServerException": { + "com.amazonaws.opensearchserverless#LifecyclePolicySummary": { "type": "structure", "members": { - "message": { - "target": "smithy.api#String" + "type": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyType", + "traits": { + "smithy.api#documentation": "The type of lifecycle policy.
" + } + }, + "name": { + "target": "com.amazonaws.opensearchserverless#PolicyName", + "traits": { + "smithy.api#documentation": "The name of the lifecycle policy.
" + } + }, + "policyVersion": { + "target": "com.amazonaws.opensearchserverless#PolicyVersion", + "traits": { + "smithy.api#documentation": "The version of the lifecycle policy.
" + } + }, + "description": { + "target": "com.amazonaws.opensearchserverless#PolicyDescription", + "traits": { + "smithy.api#documentation": "The description of the lifecycle policy.
" + } + }, + "createdDate": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The Epoch time when the lifecycle policy was created.
" + } + }, + "lastModifiedDate": { + "target": "smithy.api#Long", + "traits": { + "smithy.api#documentation": "The date and time when the lifecycle policy was last modified.
" + } } }, "traits": { - "smithy.api#documentation": "Thrown when an error internal to the service occurs while processing a request.
", - "smithy.api#error": "server", - "smithy.api#httpError": 500 + "smithy.api#documentation": "A summary of the lifecycle policy.
" + } + }, + "com.amazonaws.opensearchserverless#LifecyclePolicyType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "name": "retention", + "value": "retention", + "documentation": "retention policy type" + } + ] + } + }, + "com.amazonaws.opensearchserverless#LifecycleResource": { + "type": "string" + }, + "com.amazonaws.opensearchserverless#LifecycleResourceFilter": { + "type": "list", + "member": { + "target": "com.amazonaws.opensearchserverless#LifecycleResource" } }, "com.amazonaws.opensearchserverless#ListAccessPolicies": { @@ -1832,7 +2458,7 @@ "collectionFilters": { "target": "com.amazonaws.opensearchserverless#CollectionFilters", "traits": { - "smithy.api#documentation": "List of filter names and values that you can use for requests.
" + "smithy.api#documentation": "A list of filter names and values that you can use for requests.
" } }, "nextToken": { @@ -1870,6 +2496,93 @@ } } }, + "com.amazonaws.opensearchserverless#ListLifecyclePolicies": { + "type": "operation", + "input": { + "target": "com.amazonaws.opensearchserverless#ListLifecyclePoliciesRequest" + }, + "output": { + "target": "com.amazonaws.opensearchserverless#ListLifecyclePoliciesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.opensearchserverless#InternalServerException" + }, + { + "target": "com.amazonaws.opensearchserverless#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "Returns a list of OpenSearch Serverless lifecycle policies. For more information, see Viewing data lifecycle policies.
", + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "maxResults": "maxResults" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.opensearchserverless#ListLifecyclePoliciesRequest": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyType", + "traits": { + "smithy.api#documentation": "The type of lifecycle policy.
", + "smithy.api#required": {} + } + }, + "resources": { + "target": "com.amazonaws.opensearchserverless#LifecycleResourceFilter", + "traits": { + "smithy.api#documentation": "Resource filters that policies can apply to. Currently, the only supported resource type is index
.
If your initial ListLifecyclePolicies
operation returns a nextToken
, you can include the returned nextToken
in subsequent ListLifecyclePolicies
operations, which returns results in the next page.
An optional parameter that specifies the maximum number of results to return. You can use use nextToken
to get the next page of results. The default is 10.
Details about the requested lifecycle policies.
" + } + }, + "nextToken": { + "target": "smithy.api#String", + "traits": { + "smithy.api#documentation": "When nextToken
is returned, there are more results available. The value of nextToken
is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page.
Updates an OpenSearch Serverless access policy. For more information, see Updating data lifecycle policies.
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.opensearchserverless#UpdateLifecyclePolicyRequest": { + "type": "structure", + "members": { + "type": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyType", + "traits": { + "smithy.api#documentation": "The type of lifecycle policy.
", + "smithy.api#required": {} + } + }, + "name": { + "target": "com.amazonaws.opensearchserverless#PolicyName", + "traits": { + "smithy.api#documentation": "The name of the policy.
", + "smithy.api#required": {} + } + }, + "policyVersion": { + "target": "com.amazonaws.opensearchserverless#PolicyVersion", + "traits": { + "smithy.api#documentation": "The version of the policy being updated.
", + "smithy.api#required": {} + } + }, + "description": { + "target": "com.amazonaws.opensearchserverless#PolicyDescription", + "traits": { + "smithy.api#documentation": "A description of the lifecycle policy.
" + } + }, + "policy": { + "target": "com.amazonaws.opensearchserverless#PolicyDocument", + "traits": { + "smithy.api#documentation": "The JSON policy document to use as the content for the lifecycle policy.
" + } + }, + "clientToken": { + "target": "com.amazonaws.opensearchserverless#ClientToken", + "traits": { + "aws.cloudformation#cfnExcludeProperty": {}, + "smithy.api#documentation": "A unique, case-sensitive identifier to ensure idempotency of the request.
", + "smithy.api#idempotencyToken": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.opensearchserverless#UpdateLifecyclePolicyResponse": { + "type": "structure", + "members": { + "lifecyclePolicyDetail": { + "target": "com.amazonaws.opensearchserverless#LifecyclePolicyDetail", + "traits": { + "smithy.api#documentation": "Details about the updated lifecycle policy.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.opensearchserverless#UpdateSecurityConfig": { "type": "operation", "input": {