diff --git a/clients/client-appstream/src/AppStream.ts b/clients/client-appstream/src/AppStream.ts index bb3e6f65e64c..0aac16c7bc28 100644 --- a/clients/client-appstream/src/AppStream.ts +++ b/clients/client-appstream/src/AppStream.ts @@ -6,6 +6,11 @@ import { AssociateApplicationFleetCommandInput, AssociateApplicationFleetCommandOutput, } from "./commands/AssociateApplicationFleetCommand"; +import { + AssociateApplicationToEntitlementCommand, + AssociateApplicationToEntitlementCommandInput, + AssociateApplicationToEntitlementCommandOutput, +} from "./commands/AssociateApplicationToEntitlementCommand"; import { AssociateFleetCommand, AssociateFleetCommandInput, @@ -37,6 +42,11 @@ import { CreateDirectoryConfigCommandInput, CreateDirectoryConfigCommandOutput, } from "./commands/CreateDirectoryConfigCommand"; +import { + CreateEntitlementCommand, + CreateEntitlementCommandInput, + CreateEntitlementCommandOutput, +} from "./commands/CreateEntitlementCommand"; import { CreateFleetCommand, CreateFleetCommandInput, CreateFleetCommandOutput } from "./commands/CreateFleetCommand"; import { CreateImageBuilderCommand, @@ -80,6 +90,11 @@ import { DeleteDirectoryConfigCommandInput, DeleteDirectoryConfigCommandOutput, } from "./commands/DeleteDirectoryConfigCommand"; +import { + DeleteEntitlementCommand, + DeleteEntitlementCommandInput, + DeleteEntitlementCommandOutput, +} from "./commands/DeleteEntitlementCommand"; import { DeleteFleetCommand, DeleteFleetCommandInput, DeleteFleetCommandOutput } from "./commands/DeleteFleetCommand"; import { DeleteImageBuilderCommand, @@ -119,6 +134,11 @@ import { DescribeDirectoryConfigsCommandInput, DescribeDirectoryConfigsCommandOutput, } from "./commands/DescribeDirectoryConfigsCommand"; +import { + DescribeEntitlementsCommand, + DescribeEntitlementsCommandInput, + DescribeEntitlementsCommandOutput, +} from "./commands/DescribeEntitlementsCommand"; import { DescribeFleetsCommand, DescribeFleetsCommandInput, @@ -170,6 +190,11 @@ import { DisassociateApplicationFleetCommandInput, DisassociateApplicationFleetCommandOutput, } from "./commands/DisassociateApplicationFleetCommand"; +import { + DisassociateApplicationFromEntitlementCommand, + DisassociateApplicationFromEntitlementCommandInput, + DisassociateApplicationFromEntitlementCommandOutput, +} from "./commands/DisassociateApplicationFromEntitlementCommand"; import { DisassociateFleetCommand, DisassociateFleetCommandInput, @@ -191,6 +216,11 @@ import { ListAssociatedStacksCommandInput, ListAssociatedStacksCommandOutput, } from "./commands/ListAssociatedStacksCommand"; +import { + ListEntitledApplicationsCommand, + ListEntitledApplicationsCommandInput, + ListEntitledApplicationsCommandOutput, +} from "./commands/ListEntitledApplicationsCommand"; import { ListTagsForResourceCommand, ListTagsForResourceCommandInput, @@ -224,6 +254,11 @@ import { UpdateDirectoryConfigCommandInput, UpdateDirectoryConfigCommandOutput, } from "./commands/UpdateDirectoryConfigCommand"; +import { + UpdateEntitlementCommand, + UpdateEntitlementCommandInput, + UpdateEntitlementCommandOutput, +} from "./commands/UpdateEntitlementCommand"; import { UpdateFleetCommand, UpdateFleetCommandInput, UpdateFleetCommandOutput } from "./commands/UpdateFleetCommand"; import { UpdateImagePermissionsCommand, @@ -288,6 +323,38 @@ export class AppStream extends AppStreamClient { } } + /** + *
Associates an application to entitle.
+ */ + public associateApplicationToEntitlement( + args: AssociateApplicationToEntitlementCommandInput, + options?: __HttpHandlerOptions + ): PromiseAssociates the specified fleet with the specified stack.
*/ @@ -518,6 +585,43 @@ export class AppStream extends AppStreamClient { } } + /** + *Creates a new entitlement. Entitlements control access to specific applications within + * a stack, based on user attributes. Entitlements apply to SAML 2.0 federated user + * identities. Amazon AppStream 2.0 user pool and streaming URL users are entitled to all + * applications in a stack. Entitlements don't apply to the desktop stream view + * application, or to applications managed by a dynamic app provider using the Dynamic + * Application Framework.
+ */ + public createEntitlement( + args: CreateEntitlementCommandInput, + options?: __HttpHandlerOptions + ): PromiseCreates a fleet. A fleet consists of streaming instances that run a specified image when using Always-On or On-Demand.
*/ @@ -856,6 +960,38 @@ export class AppStream extends AppStreamClient { } } + /** + *Deletes the specified entitlement.
+ */ + public deleteEntitlement( + args: DeleteEntitlementCommandInput, + options?: __HttpHandlerOptions + ): PromiseDeletes the specified fleet.
*/ @@ -1187,6 +1323,38 @@ export class AppStream extends AppStreamClient { } } + /** + *Retrieves a list that describes one of more entitlements.
+ */ + public describeEntitlements( + args: DescribeEntitlementsCommandInput, + options?: __HttpHandlerOptions + ): PromiseRetrieves a list that describes one or more specified fleets, if the fleet names are provided. Otherwise, all fleets in the account are described.
*/ @@ -1543,6 +1711,40 @@ export class AppStream extends AppStreamClient { } } + /** + *Deletes the specified application from the specified entitlement.
+ */ + public disassociateApplicationFromEntitlement( + args: DisassociateApplicationFromEntitlementCommandInput, + options?: __HttpHandlerOptions + ): PromiseDisassociates the specified fleet from the specified stack.
*/ @@ -1697,6 +1899,38 @@ export class AppStream extends AppStreamClient { } } + /** + *Retrieves a list of entitled applications.
+ */ + public listEntitledApplications( + args: ListEntitledApplicationsCommandInput, + options?: __HttpHandlerOptions + ): PromiseRetrieves a list of all tags for the specified AppStream 2.0 resource. You can tag AppStream 2.0 image builders, images, fleets, and stacks.
*For more information about tags, see Tagging Your Resources in the Amazon AppStream 2.0 Administration Guide.
@@ -1976,6 +2210,38 @@ export class AppStream extends AppStreamClient { } } + /** + *Updates the specified entitlement.
+ */ + public updateEntitlement( + args: UpdateEntitlementCommandInput, + options?: __HttpHandlerOptions + ): PromiseUpdates the specified fleet.
*If the fleet is in the STOPPED state, you can update any attribute except
diff --git a/clients/client-appstream/src/AppStreamClient.ts b/clients/client-appstream/src/AppStreamClient.ts
index 4ba943d8ad65..5ea2a979785b 100644
--- a/clients/client-appstream/src/AppStreamClient.ts
+++ b/clients/client-appstream/src/AppStreamClient.ts
@@ -53,6 +53,10 @@ import {
AssociateApplicationFleetCommandInput,
AssociateApplicationFleetCommandOutput,
} from "./commands/AssociateApplicationFleetCommand";
+import {
+ AssociateApplicationToEntitlementCommandInput,
+ AssociateApplicationToEntitlementCommandOutput,
+} from "./commands/AssociateApplicationToEntitlementCommand";
import { AssociateFleetCommandInput, AssociateFleetCommandOutput } from "./commands/AssociateFleetCommand";
import {
BatchAssociateUserStackCommandInput,
@@ -69,6 +73,7 @@ import {
CreateDirectoryConfigCommandInput,
CreateDirectoryConfigCommandOutput,
} from "./commands/CreateDirectoryConfigCommand";
+import { CreateEntitlementCommandInput, CreateEntitlementCommandOutput } from "./commands/CreateEntitlementCommand";
import { CreateFleetCommandInput, CreateFleetCommandOutput } from "./commands/CreateFleetCommand";
import { CreateImageBuilderCommandInput, CreateImageBuilderCommandOutput } from "./commands/CreateImageBuilderCommand";
import {
@@ -89,6 +94,7 @@ import {
DeleteDirectoryConfigCommandInput,
DeleteDirectoryConfigCommandOutput,
} from "./commands/DeleteDirectoryConfigCommand";
+import { DeleteEntitlementCommandInput, DeleteEntitlementCommandOutput } from "./commands/DeleteEntitlementCommand";
import { DeleteFleetCommandInput, DeleteFleetCommandOutput } from "./commands/DeleteFleetCommand";
import { DeleteImageBuilderCommandInput, DeleteImageBuilderCommandOutput } from "./commands/DeleteImageBuilderCommand";
import { DeleteImageCommandInput, DeleteImageCommandOutput } from "./commands/DeleteImageCommand";
@@ -115,6 +121,10 @@ import {
DescribeDirectoryConfigsCommandInput,
DescribeDirectoryConfigsCommandOutput,
} from "./commands/DescribeDirectoryConfigsCommand";
+import {
+ DescribeEntitlementsCommandInput,
+ DescribeEntitlementsCommandOutput,
+} from "./commands/DescribeEntitlementsCommand";
import { DescribeFleetsCommandInput, DescribeFleetsCommandOutput } from "./commands/DescribeFleetsCommand";
import {
DescribeImageBuildersCommandInput,
@@ -141,6 +151,10 @@ import {
DisassociateApplicationFleetCommandInput,
DisassociateApplicationFleetCommandOutput,
} from "./commands/DisassociateApplicationFleetCommand";
+import {
+ DisassociateApplicationFromEntitlementCommandInput,
+ DisassociateApplicationFromEntitlementCommandOutput,
+} from "./commands/DisassociateApplicationFromEntitlementCommand";
import { DisassociateFleetCommandInput, DisassociateFleetCommandOutput } from "./commands/DisassociateFleetCommand";
import { EnableUserCommandInput, EnableUserCommandOutput } from "./commands/EnableUserCommand";
import { ExpireSessionCommandInput, ExpireSessionCommandOutput } from "./commands/ExpireSessionCommand";
@@ -152,6 +166,10 @@ import {
ListAssociatedStacksCommandInput,
ListAssociatedStacksCommandOutput,
} from "./commands/ListAssociatedStacksCommand";
+import {
+ ListEntitledApplicationsCommandInput,
+ ListEntitledApplicationsCommandOutput,
+} from "./commands/ListEntitledApplicationsCommand";
import {
ListTagsForResourceCommandInput,
ListTagsForResourceCommandOutput,
@@ -167,6 +185,7 @@ import {
UpdateDirectoryConfigCommandInput,
UpdateDirectoryConfigCommandOutput,
} from "./commands/UpdateDirectoryConfigCommand";
+import { UpdateEntitlementCommandInput, UpdateEntitlementCommandOutput } from "./commands/UpdateEntitlementCommand";
import { UpdateFleetCommandInput, UpdateFleetCommandOutput } from "./commands/UpdateFleetCommand";
import {
UpdateImagePermissionsCommandInput,
@@ -177,6 +196,7 @@ import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
export type ServiceInputTypes =
| AssociateApplicationFleetCommandInput
+ | AssociateApplicationToEntitlementCommandInput
| AssociateFleetCommandInput
| BatchAssociateUserStackCommandInput
| BatchDisassociateUserStackCommandInput
@@ -184,6 +204,7 @@ export type ServiceInputTypes =
| CreateAppBlockCommandInput
| CreateApplicationCommandInput
| CreateDirectoryConfigCommandInput
+ | CreateEntitlementCommandInput
| CreateFleetCommandInput
| CreateImageBuilderCommandInput
| CreateImageBuilderStreamingURLCommandInput
@@ -195,6 +216,7 @@ export type ServiceInputTypes =
| DeleteAppBlockCommandInput
| DeleteApplicationCommandInput
| DeleteDirectoryConfigCommandInput
+ | DeleteEntitlementCommandInput
| DeleteFleetCommandInput
| DeleteImageBuilderCommandInput
| DeleteImageCommandInput
@@ -206,6 +228,7 @@ export type ServiceInputTypes =
| DescribeApplicationFleetAssociationsCommandInput
| DescribeApplicationsCommandInput
| DescribeDirectoryConfigsCommandInput
+ | DescribeEntitlementsCommandInput
| DescribeFleetsCommandInput
| DescribeImageBuildersCommandInput
| DescribeImagePermissionsCommandInput
@@ -217,11 +240,13 @@ export type ServiceInputTypes =
| DescribeUsersCommandInput
| DisableUserCommandInput
| DisassociateApplicationFleetCommandInput
+ | DisassociateApplicationFromEntitlementCommandInput
| DisassociateFleetCommandInput
| EnableUserCommandInput
| ExpireSessionCommandInput
| ListAssociatedFleetsCommandInput
| ListAssociatedStacksCommandInput
+ | ListEntitledApplicationsCommandInput
| ListTagsForResourceCommandInput
| StartFleetCommandInput
| StartImageBuilderCommandInput
@@ -231,12 +256,14 @@ export type ServiceInputTypes =
| UntagResourceCommandInput
| UpdateApplicationCommandInput
| UpdateDirectoryConfigCommandInput
+ | UpdateEntitlementCommandInput
| UpdateFleetCommandInput
| UpdateImagePermissionsCommandInput
| UpdateStackCommandInput;
export type ServiceOutputTypes =
| AssociateApplicationFleetCommandOutput
+ | AssociateApplicationToEntitlementCommandOutput
| AssociateFleetCommandOutput
| BatchAssociateUserStackCommandOutput
| BatchDisassociateUserStackCommandOutput
@@ -244,6 +271,7 @@ export type ServiceOutputTypes =
| CreateAppBlockCommandOutput
| CreateApplicationCommandOutput
| CreateDirectoryConfigCommandOutput
+ | CreateEntitlementCommandOutput
| CreateFleetCommandOutput
| CreateImageBuilderCommandOutput
| CreateImageBuilderStreamingURLCommandOutput
@@ -255,6 +283,7 @@ export type ServiceOutputTypes =
| DeleteAppBlockCommandOutput
| DeleteApplicationCommandOutput
| DeleteDirectoryConfigCommandOutput
+ | DeleteEntitlementCommandOutput
| DeleteFleetCommandOutput
| DeleteImageBuilderCommandOutput
| DeleteImageCommandOutput
@@ -266,6 +295,7 @@ export type ServiceOutputTypes =
| DescribeApplicationFleetAssociationsCommandOutput
| DescribeApplicationsCommandOutput
| DescribeDirectoryConfigsCommandOutput
+ | DescribeEntitlementsCommandOutput
| DescribeFleetsCommandOutput
| DescribeImageBuildersCommandOutput
| DescribeImagePermissionsCommandOutput
@@ -277,11 +307,13 @@ export type ServiceOutputTypes =
| DescribeUsersCommandOutput
| DisableUserCommandOutput
| DisassociateApplicationFleetCommandOutput
+ | DisassociateApplicationFromEntitlementCommandOutput
| DisassociateFleetCommandOutput
| EnableUserCommandOutput
| ExpireSessionCommandOutput
| ListAssociatedFleetsCommandOutput
| ListAssociatedStacksCommandOutput
+ | ListEntitledApplicationsCommandOutput
| ListTagsForResourceCommandOutput
| StartFleetCommandOutput
| StartImageBuilderCommandOutput
@@ -291,6 +323,7 @@ export type ServiceOutputTypes =
| UntagResourceCommandOutput
| UpdateApplicationCommandOutput
| UpdateDirectoryConfigCommandOutput
+ | UpdateEntitlementCommandOutput
| UpdateFleetCommandOutput
| UpdateImagePermissionsCommandOutput
| UpdateStackCommandOutput;
diff --git a/clients/client-appstream/src/commands/AssociateApplicationToEntitlementCommand.ts b/clients/client-appstream/src/commands/AssociateApplicationToEntitlementCommand.ts
new file mode 100644
index 000000000000..424b3522b496
--- /dev/null
+++ b/clients/client-appstream/src/commands/AssociateApplicationToEntitlementCommand.ts
@@ -0,0 +1,103 @@
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ HttpHandlerOptions as __HttpHandlerOptions,
+ MetadataBearer as __MetadataBearer,
+ MiddlewareStack,
+ SerdeContext as __SerdeContext,
+} from "@aws-sdk/types";
+
+import { AppStreamClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppStreamClient";
+import { AssociateApplicationToEntitlementRequest, AssociateApplicationToEntitlementResult } from "../models/models_0";
+import {
+ deserializeAws_json1_1AssociateApplicationToEntitlementCommand,
+ serializeAws_json1_1AssociateApplicationToEntitlementCommand,
+} from "../protocols/Aws_json1_1";
+
+export interface AssociateApplicationToEntitlementCommandInput extends AssociateApplicationToEntitlementRequest {}
+export interface AssociateApplicationToEntitlementCommandOutput
+ extends AssociateApplicationToEntitlementResult,
+ __MetadataBearer {}
+
+/**
+ *
Associates an application to entitle.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppStreamClient, AssociateApplicationToEntitlementCommand } from "@aws-sdk/client-appstream"; // ES Modules import + * // const { AppStreamClient, AssociateApplicationToEntitlementCommand } = require("@aws-sdk/client-appstream"); // CommonJS import + * const client = new AppStreamClient(config); + * const command = new AssociateApplicationToEntitlementCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link AssociateApplicationToEntitlementCommandInput} for command's `input` shape. + * @see {@link AssociateApplicationToEntitlementCommandOutput} for command's `response` shape. + * @see {@link AppStreamClientResolvedConfig | config} for AppStreamClient's `config` shape. + * + */ +export class AssociateApplicationToEntitlementCommand extends $Command< + AssociateApplicationToEntitlementCommandInput, + AssociateApplicationToEntitlementCommandOutput, + AppStreamClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: AssociateApplicationToEntitlementCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackCreates a new entitlement. Entitlements control access to specific applications within + * a stack, based on user attributes. Entitlements apply to SAML 2.0 federated user + * identities. Amazon AppStream 2.0 user pool and streaming URL users are entitled to all + * applications in a stack. Entitlements don't apply to the desktop stream view + * application, or to applications managed by a dynamic app provider using the Dynamic + * Application Framework.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppStreamClient, CreateEntitlementCommand } from "@aws-sdk/client-appstream"; // ES Modules import + * // const { AppStreamClient, CreateEntitlementCommand } = require("@aws-sdk/client-appstream"); // CommonJS import + * const client = new AppStreamClient(config); + * const command = new CreateEntitlementCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateEntitlementCommandInput} for command's `input` shape. + * @see {@link CreateEntitlementCommandOutput} for command's `response` shape. + * @see {@link AppStreamClientResolvedConfig | config} for AppStreamClient's `config` shape. + * + */ +export class CreateEntitlementCommand extends $Command< + CreateEntitlementCommandInput, + CreateEntitlementCommandOutput, + AppStreamClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateEntitlementCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackDeletes the specified entitlement.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppStreamClient, DeleteEntitlementCommand } from "@aws-sdk/client-appstream"; // ES Modules import + * // const { AppStreamClient, DeleteEntitlementCommand } = require("@aws-sdk/client-appstream"); // CommonJS import + * const client = new AppStreamClient(config); + * const command = new DeleteEntitlementCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DeleteEntitlementCommandInput} for command's `input` shape. + * @see {@link DeleteEntitlementCommandOutput} for command's `response` shape. + * @see {@link AppStreamClientResolvedConfig | config} for AppStreamClient's `config` shape. + * + */ +export class DeleteEntitlementCommand extends $Command< + DeleteEntitlementCommandInput, + DeleteEntitlementCommandOutput, + AppStreamClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteEntitlementCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackRetrieves a list that describes one of more entitlements.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppStreamClient, DescribeEntitlementsCommand } from "@aws-sdk/client-appstream"; // ES Modules import + * // const { AppStreamClient, DescribeEntitlementsCommand } = require("@aws-sdk/client-appstream"); // CommonJS import + * const client = new AppStreamClient(config); + * const command = new DescribeEntitlementsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DescribeEntitlementsCommandInput} for command's `input` shape. + * @see {@link DescribeEntitlementsCommandOutput} for command's `response` shape. + * @see {@link AppStreamClientResolvedConfig | config} for AppStreamClient's `config` shape. + * + */ +export class DescribeEntitlementsCommand extends $Command< + DescribeEntitlementsCommandInput, + DescribeEntitlementsCommandOutput, + AppStreamClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DescribeEntitlementsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackDeletes the specified application from the specified entitlement.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppStreamClient, DisassociateApplicationFromEntitlementCommand } from "@aws-sdk/client-appstream"; // ES Modules import + * // const { AppStreamClient, DisassociateApplicationFromEntitlementCommand } = require("@aws-sdk/client-appstream"); // CommonJS import + * const client = new AppStreamClient(config); + * const command = new DisassociateApplicationFromEntitlementCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link DisassociateApplicationFromEntitlementCommandInput} for command's `input` shape. + * @see {@link DisassociateApplicationFromEntitlementCommandOutput} for command's `response` shape. + * @see {@link AppStreamClientResolvedConfig | config} for AppStreamClient's `config` shape. + * + */ +export class DisassociateApplicationFromEntitlementCommand extends $Command< + DisassociateApplicationFromEntitlementCommandInput, + DisassociateApplicationFromEntitlementCommandOutput, + AppStreamClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DisassociateApplicationFromEntitlementCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackRetrieves a list of entitled applications.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppStreamClient, ListEntitledApplicationsCommand } from "@aws-sdk/client-appstream"; // ES Modules import + * // const { AppStreamClient, ListEntitledApplicationsCommand } = require("@aws-sdk/client-appstream"); // CommonJS import + * const client = new AppStreamClient(config); + * const command = new ListEntitledApplicationsCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListEntitledApplicationsCommandInput} for command's `input` shape. + * @see {@link ListEntitledApplicationsCommandOutput} for command's `response` shape. + * @see {@link AppStreamClientResolvedConfig | config} for AppStreamClient's `config` shape. + * + */ +export class ListEntitledApplicationsCommand extends $Command< + ListEntitledApplicationsCommandInput, + ListEntitledApplicationsCommandOutput, + AppStreamClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListEntitledApplicationsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackUpdates the specified entitlement.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { AppStreamClient, UpdateEntitlementCommand } from "@aws-sdk/client-appstream"; // ES Modules import + * // const { AppStreamClient, UpdateEntitlementCommand } = require("@aws-sdk/client-appstream"); // CommonJS import + * const client = new AppStreamClient(config); + * const command = new UpdateEntitlementCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link UpdateEntitlementCommandInput} for command's `input` shape. + * @see {@link UpdateEntitlementCommandOutput} for command's `response` shape. + * @see {@link AppStreamClientResolvedConfig | config} for AppStreamClient's `config` shape. + * + */ +export class UpdateEntitlementCommand extends $Command< + UpdateEntitlementCommandInput, + UpdateEntitlementCommandOutput, + AppStreamClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateEntitlementCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackThe name of the fleet.
@@ -470,6 +475,64 @@ export namespace ResourceNotFoundException { }); } +export interface AssociateApplicationToEntitlementRequest { + /** + *The name of the stack.
+ */ + StackName: string | undefined; + + /** + *The name of the entitlement.
+ */ + EntitlementName: string | undefined; + + /** + *The identifier of the application.
+ */ + ApplicationIdentifier: string | undefined; +} + +export namespace AssociateApplicationToEntitlementRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssociateApplicationToEntitlementRequest): any => ({ + ...obj, + }); +} + +export interface AssociateApplicationToEntitlementResult {} + +export namespace AssociateApplicationToEntitlementResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: AssociateApplicationToEntitlementResult): any => ({ + ...obj, + }); +} + +/** + *The entitlement can't be found.
+ */ +export interface EntitlementNotFoundException extends __SmithyException, $MetadataBearer { + name: "EntitlementNotFoundException"; + $fault: "client"; + /** + *The error message in the exception.
+ */ + Message?: string; +} + +export namespace EntitlementNotFoundException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: EntitlementNotFoundException): any => ({ + ...obj, + }); +} + export interface AssociateFleetRequest { /** *The name of the fleet.
@@ -1114,6 +1177,187 @@ export namespace InvalidRoleException { }); } +/** + *An attribute associated with an entitlement. Application entitlements work by matching + * a supported SAML 2.0 attribute name to a value when a user identity federates to an + * Amazon AppStream 2.0 SAML application.
+ */ +export interface EntitlementAttribute { + /** + *A supported AWS IAM SAML PrincipalTag attribute that is matched to the
+ * associated value when a user identity federates into an Amazon AppStream 2.0 SAML
+ * application.
The following are valid values:
+ *roles
+ *department
+ *organization
+ *groups
+ *title
+ *costCenter
+ *userType
+ *+ */ + Name: string | undefined; + + /** + *
A value that is matched to a supported SAML attribute name when a user identity + * federates into an Amazon AppStream 2.0 SAML application.
+ */ + Value: string | undefined; +} + +export namespace EntitlementAttribute { + /** + * @internal + */ + export const filterSensitiveLog = (obj: EntitlementAttribute): any => ({ + ...obj, + }); +} + +export interface CreateEntitlementRequest { + /** + *The name of the entitlement.
+ */ + Name: string | undefined; + + /** + *The name of the stack with which the entitlement is associated.
+ */ + StackName: string | undefined; + + /** + *The description of the entitlement.
+ */ + Description?: string; + + /** + *Specifies whether all or selected apps are entitled.
+ */ + AppVisibility: AppVisibility | string | undefined; + + /** + *The attributes of the entitlement.
+ */ + Attributes: EntitlementAttribute[] | undefined; +} + +export namespace CreateEntitlementRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateEntitlementRequest): any => ({ + ...obj, + }); +} + +/** + *Specifies an entitlement. Entitlements control access to specific applications within + * a stack, based on user attributes. Entitlements apply to SAML 2.0 federated user + * identities. Amazon AppStream 2.0 user pool and streaming URL users are entitled to all + * applications in a stack. Entitlements don't apply to the desktop stream view + * application, or to applications managed by a dynamic app provider using the Dynamic + * Application Framework.
+ */ +export interface Entitlement { + /** + *The name of the entitlement.
+ */ + Name: string | undefined; + + /** + *The name of the stack with which the entitlement is associated.
+ */ + StackName: string | undefined; + + /** + *The description of the entitlement.
+ */ + Description?: string; + + /** + *Specifies whether all or selected apps are entitled.
+ */ + AppVisibility: AppVisibility | string | undefined; + + /** + *The attributes of the entitlement.
+ */ + Attributes: EntitlementAttribute[] | undefined; + + /** + *The time when the entitlement was created.
+ */ + CreatedTime?: Date; + + /** + *The time when the entitlement was last modified.
+ */ + LastModifiedTime?: Date; +} + +export namespace Entitlement { + /** + * @internal + */ + export const filterSensitiveLog = (obj: Entitlement): any => ({ + ...obj, + }); +} + +export interface CreateEntitlementResult { + /** + *The entitlement.
+ */ + Entitlement?: Entitlement; +} + +export namespace CreateEntitlementResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateEntitlementResult): any => ({ + ...obj, + }); +} + +/** + *The entitlement already exists.
+ */ +export interface EntitlementAlreadyExistsException extends __SmithyException, $MetadataBearer { + name: "EntitlementAlreadyExistsException"; + $fault: "client"; + /** + *The error message in the exception.
+ */ + Message?: string; +} + +export namespace EntitlementAlreadyExistsException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: EntitlementAlreadyExistsException): any => ({ + ...obj, + }); +} + /** *Describes the configuration information required to join fleets and image builders to Microsoft Active Directory domains.
*/ @@ -3116,6 +3360,38 @@ export namespace DeleteDirectoryConfigResult { }); } +export interface DeleteEntitlementRequest { + /** + *The name of the entitlement.
+ */ + Name: string | undefined; + + /** + *The name of the stack with which the entitlement is associated.
+ */ + StackName: string | undefined; +} + +export namespace DeleteEntitlementRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteEntitlementRequest): any => ({ + ...obj, + }); +} + +export interface DeleteEntitlementResult {} + +export namespace DeleteEntitlementResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteEntitlementResult): any => ({ + ...obj, + }); +} + export interface DeleteFleetRequest { /** *The name of the fleet.
@@ -3527,6 +3803,59 @@ export namespace DescribeDirectoryConfigsResult { }); } +export interface DescribeEntitlementsRequest { + /** + *The name of the entitlement.
+ */ + Name?: string; + + /** + *The name of the stack with which the entitlement is associated.
+ */ + StackName: string | undefined; + + /** + *The pagination token used to retrieve the next page of results for this operation.
+ */ + NextToken?: string; + + /** + *The maximum size of each page of results.
+ */ + MaxResults?: number; +} + +export namespace DescribeEntitlementsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeEntitlementsRequest): any => ({ + ...obj, + }); +} + +export interface DescribeEntitlementsResult { + /** + *The entitlements.
+ */ + Entitlements?: Entitlement[]; + + /** + *The pagination token used to retrieve the next page of results for this + * operation.
+ */ + NextToken?: string; +} + +export namespace DescribeEntitlementsResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeEntitlementsResult): any => ({ + ...obj, + }); +} + export interface DescribeFleetsRequest { /** *The names of the fleets to describe.
@@ -4308,6 +4637,43 @@ export namespace DisassociateApplicationFleetResult { }); } +export interface DisassociateApplicationFromEntitlementRequest { + /** + *The name of the stack with which the entitlement is associated.
+ */ + StackName: string | undefined; + + /** + *The name of the entitlement.
+ */ + EntitlementName: string | undefined; + + /** + *The identifier of the application to remove from the entitlement.
+ */ + ApplicationIdentifier: string | undefined; +} + +export namespace DisassociateApplicationFromEntitlementRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DisassociateApplicationFromEntitlementRequest): any => ({ + ...obj, + }); +} + +export interface DisassociateApplicationFromEntitlementResult {} + +export namespace DisassociateApplicationFromEntitlementResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DisassociateApplicationFromEntitlementResult): any => ({ + ...obj, + }); +} + export interface DisassociateFleetRequest { /** *The name of the fleet.
@@ -4377,6 +4743,25 @@ export namespace EnableUserResult { }); } +/** + *The application associated to an entitlement. Access is controlled based on user attributes.
+ */ +export interface EntitledApplication { + /** + *The identifier of the application.
+ */ + ApplicationIdentifier: string | undefined; +} + +export namespace EntitledApplication { + /** + * @internal + */ + export const filterSensitiveLog = (obj: EntitledApplication): any => ({ + ...obj, + }); +} + export interface ExpireSessionRequest { /** *The identifier of the streaming session.
@@ -4496,6 +4881,58 @@ export namespace ListAssociatedStacksResult { }); } +export interface ListEntitledApplicationsRequest { + /** + *The name of the stack with which the entitlement is associated.
+ */ + StackName: string | undefined; + + /** + *The name of the entitlement.
+ */ + EntitlementName: string | undefined; + + /** + *The pagination token used to retrieve the next page of results for this operation.
+ */ + NextToken?: string; + + /** + *The maximum size of each page of results.
+ */ + MaxResults?: number; +} + +export namespace ListEntitledApplicationsRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListEntitledApplicationsRequest): any => ({ + ...obj, + }); +} + +export interface ListEntitledApplicationsResult { + /** + *The entitled applications.
+ */ + EntitledApplications?: EntitledApplication[]; + + /** + *The pagination token used to retrieve the next page of results for this operation.
+ */ + NextToken?: string; +} + +export namespace ListEntitledApplicationsResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListEntitledApplicationsResult): any => ({ + ...obj, + }); +} + export interface ListTagsForResourceRequest { /** *The Amazon Resource Name (ARN) of the resource.
@@ -4838,6 +5275,58 @@ export namespace UpdateDirectoryConfigResult { }); } +export interface UpdateEntitlementRequest { + /** + *The name of the entitlement.
+ */ + Name: string | undefined; + + /** + *The name of the stack with which the entitlement is associated.
+ */ + StackName: string | undefined; + + /** + *The description of the entitlement.
+ */ + Description?: string; + + /** + *Specifies whether all or only selected apps are entitled.
+ */ + AppVisibility?: AppVisibility | string; + + /** + *The attributes of the entitlement.
+ */ + Attributes?: EntitlementAttribute[]; +} + +export namespace UpdateEntitlementRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateEntitlementRequest): any => ({ + ...obj, + }); +} + +export interface UpdateEntitlementResult { + /** + *The entitlement.
+ */ + Entitlement?: Entitlement; +} + +export namespace UpdateEntitlementResult { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateEntitlementResult): any => ({ + ...obj, + }); +} + export interface UpdateFleetRequest { /** *The name of the image used to create the fleet.
diff --git a/clients/client-appstream/src/protocols/Aws_json1_1.ts b/clients/client-appstream/src/protocols/Aws_json1_1.ts index 14fec1b8dfac..c3b7acc91da0 100644 --- a/clients/client-appstream/src/protocols/Aws_json1_1.ts +++ b/clients/client-appstream/src/protocols/Aws_json1_1.ts @@ -20,6 +20,10 @@ import { AssociateApplicationFleetCommandInput, AssociateApplicationFleetCommandOutput, } from "../commands/AssociateApplicationFleetCommand"; +import { + AssociateApplicationToEntitlementCommandInput, + AssociateApplicationToEntitlementCommandOutput, +} from "../commands/AssociateApplicationToEntitlementCommand"; import { AssociateFleetCommandInput, AssociateFleetCommandOutput } from "../commands/AssociateFleetCommand"; import { BatchAssociateUserStackCommandInput, @@ -36,6 +40,7 @@ import { CreateDirectoryConfigCommandInput, CreateDirectoryConfigCommandOutput, } from "../commands/CreateDirectoryConfigCommand"; +import { CreateEntitlementCommandInput, CreateEntitlementCommandOutput } from "../commands/CreateEntitlementCommand"; import { CreateFleetCommandInput, CreateFleetCommandOutput } from "../commands/CreateFleetCommand"; import { CreateImageBuilderCommandInput, CreateImageBuilderCommandOutput } from "../commands/CreateImageBuilderCommand"; import { @@ -56,6 +61,7 @@ import { DeleteDirectoryConfigCommandInput, DeleteDirectoryConfigCommandOutput, } from "../commands/DeleteDirectoryConfigCommand"; +import { DeleteEntitlementCommandInput, DeleteEntitlementCommandOutput } from "../commands/DeleteEntitlementCommand"; import { DeleteFleetCommandInput, DeleteFleetCommandOutput } from "../commands/DeleteFleetCommand"; import { DeleteImageBuilderCommandInput, DeleteImageBuilderCommandOutput } from "../commands/DeleteImageBuilderCommand"; import { DeleteImageCommandInput, DeleteImageCommandOutput } from "../commands/DeleteImageCommand"; @@ -82,6 +88,10 @@ import { DescribeDirectoryConfigsCommandInput, DescribeDirectoryConfigsCommandOutput, } from "../commands/DescribeDirectoryConfigsCommand"; +import { + DescribeEntitlementsCommandInput, + DescribeEntitlementsCommandOutput, +} from "../commands/DescribeEntitlementsCommand"; import { DescribeFleetsCommandInput, DescribeFleetsCommandOutput } from "../commands/DescribeFleetsCommand"; import { DescribeImageBuildersCommandInput, @@ -108,6 +118,10 @@ import { DisassociateApplicationFleetCommandInput, DisassociateApplicationFleetCommandOutput, } from "../commands/DisassociateApplicationFleetCommand"; +import { + DisassociateApplicationFromEntitlementCommandInput, + DisassociateApplicationFromEntitlementCommandOutput, +} from "../commands/DisassociateApplicationFromEntitlementCommand"; import { DisassociateFleetCommandInput, DisassociateFleetCommandOutput } from "../commands/DisassociateFleetCommand"; import { EnableUserCommandInput, EnableUserCommandOutput } from "../commands/EnableUserCommand"; import { ExpireSessionCommandInput, ExpireSessionCommandOutput } from "../commands/ExpireSessionCommand"; @@ -119,6 +133,10 @@ import { ListAssociatedStacksCommandInput, ListAssociatedStacksCommandOutput, } from "../commands/ListAssociatedStacksCommand"; +import { + ListEntitledApplicationsCommandInput, + ListEntitledApplicationsCommandOutput, +} from "../commands/ListEntitledApplicationsCommand"; import { ListTagsForResourceCommandInput, ListTagsForResourceCommandOutput, @@ -134,6 +152,7 @@ import { UpdateDirectoryConfigCommandInput, UpdateDirectoryConfigCommandOutput, } from "../commands/UpdateDirectoryConfigCommand"; +import { UpdateEntitlementCommandInput, UpdateEntitlementCommandOutput } from "../commands/UpdateEntitlementCommand"; import { UpdateFleetCommandInput, UpdateFleetCommandOutput } from "../commands/UpdateFleetCommand"; import { UpdateImagePermissionsCommandInput, @@ -150,6 +169,8 @@ import { ApplicationSettingsResponse, AssociateApplicationFleetRequest, AssociateApplicationFleetResult, + AssociateApplicationToEntitlementRequest, + AssociateApplicationToEntitlementResult, AssociateFleetRequest, AssociateFleetResult, BatchAssociateUserStackRequest, @@ -167,6 +188,8 @@ import { CreateApplicationResult, CreateDirectoryConfigRequest, CreateDirectoryConfigResult, + CreateEntitlementRequest, + CreateEntitlementResult, CreateFleetRequest, CreateFleetResult, CreateImageBuilderRequest, @@ -189,6 +212,8 @@ import { DeleteApplicationResult, DeleteDirectoryConfigRequest, DeleteDirectoryConfigResult, + DeleteEntitlementRequest, + DeleteEntitlementResult, DeleteFleetRequest, DeleteFleetResult, DeleteImageBuilderRequest, @@ -211,6 +236,8 @@ import { DescribeApplicationsResult, DescribeDirectoryConfigsRequest, DescribeDirectoryConfigsResult, + DescribeEntitlementsRequest, + DescribeEntitlementsResult, DescribeFleetsRequest, DescribeFleetsResult, DescribeImageBuildersRequest, @@ -234,11 +261,18 @@ import { DisableUserResult, DisassociateApplicationFleetRequest, DisassociateApplicationFleetResult, + DisassociateApplicationFromEntitlementRequest, + DisassociateApplicationFromEntitlementResult, DisassociateFleetRequest, DisassociateFleetResult, DomainJoinInfo, EnableUserRequest, EnableUserResult, + EntitledApplication, + Entitlement, + EntitlementAlreadyExistsException, + EntitlementAttribute, + EntitlementNotFoundException, ExpireSessionRequest, ExpireSessionResult, Fleet, @@ -259,6 +293,8 @@ import { ListAssociatedFleetsResult, ListAssociatedStacksRequest, ListAssociatedStacksResult, + ListEntitledApplicationsRequest, + ListEntitledApplicationsResult, ListTagsForResourceRequest, ListTagsForResourceResponse, NetworkAccessConfiguration, @@ -295,6 +331,8 @@ import { UpdateApplicationResult, UpdateDirectoryConfigRequest, UpdateDirectoryConfigResult, + UpdateEntitlementRequest, + UpdateEntitlementResult, UpdateFleetRequest, UpdateFleetResult, UpdateImagePermissionsRequest, @@ -322,6 +360,19 @@ export const serializeAws_json1_1AssociateApplicationFleetCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1AssociateApplicationToEntitlementCommand = async ( + input: AssociateApplicationToEntitlementCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "PhotonAdminProxyService.AssociateApplicationToEntitlement", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1AssociateApplicationToEntitlementRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1AssociateFleetCommand = async ( input: AssociateFleetCommandInput, context: __SerdeContext @@ -413,6 +464,19 @@ export const serializeAws_json1_1CreateDirectoryConfigCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1CreateEntitlementCommand = async ( + input: CreateEntitlementCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "PhotonAdminProxyService.CreateEntitlement", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1CreateEntitlementRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1CreateFleetCommand = async ( input: CreateFleetCommandInput, context: __SerdeContext @@ -556,6 +620,19 @@ export const serializeAws_json1_1DeleteDirectoryConfigCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1DeleteEntitlementCommand = async ( + input: DeleteEntitlementCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "PhotonAdminProxyService.DeleteEntitlement", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1DeleteEntitlementRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1DeleteFleetCommand = async ( input: DeleteFleetCommandInput, context: __SerdeContext @@ -699,6 +776,19 @@ export const serializeAws_json1_1DescribeDirectoryConfigsCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1DescribeEntitlementsCommand = async ( + input: DescribeEntitlementsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "PhotonAdminProxyService.DescribeEntitlements", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1DescribeEntitlementsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1DescribeFleetsCommand = async ( input: DescribeFleetsCommandInput, context: __SerdeContext @@ -842,6 +932,19 @@ export const serializeAws_json1_1DisassociateApplicationFleetCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1DisassociateApplicationFromEntitlementCommand = async ( + input: DisassociateApplicationFromEntitlementCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "PhotonAdminProxyService.DisassociateApplicationFromEntitlement", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1DisassociateApplicationFromEntitlementRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1DisassociateFleetCommand = async ( input: DisassociateFleetCommandInput, context: __SerdeContext @@ -907,6 +1010,19 @@ export const serializeAws_json1_1ListAssociatedStacksCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1ListEntitledApplicationsCommand = async ( + input: ListEntitledApplicationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "PhotonAdminProxyService.ListEntitledApplications", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1ListEntitledApplicationsRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1ListTagsForResourceCommand = async ( input: ListTagsForResourceCommandInput, context: __SerdeContext @@ -1024,6 +1140,19 @@ export const serializeAws_json1_1UpdateDirectoryConfigCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +export const serializeAws_json1_1UpdateEntitlementCommand = async ( + input: UpdateEntitlementCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = { + "content-type": "application/x-amz-json-1.1", + "x-amz-target": "PhotonAdminProxyService.UpdateEntitlement", + }; + let body: any; + body = JSON.stringify(serializeAws_json1_1UpdateEntitlementRequest(input, context)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + export const serializeAws_json1_1UpdateFleetCommand = async ( input: UpdateFleetCommandInput, context: __SerdeContext @@ -1149,6 +1278,84 @@ const deserializeAws_json1_1AssociateApplicationFleetCommandError = async ( return Promise.reject(Object.assign(new Error(message), response)); }; +export const deserializeAws_json1_1AssociateApplicationToEntitlementCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): PromiseThe maximum batching size for a resolver.
+ */ + maxBatchSize?: number; } export namespace CreateFunctionRequest { @@ -1714,6 +1719,11 @@ export interface FunctionConfiguration { * resolver is invoked. */ syncConfig?: SyncConfig; + + /** + *The maximum batching size for a resolver.
+ */ + maxBatchSize?: number; } export namespace FunctionConfiguration { @@ -2136,6 +2146,11 @@ export interface CreateResolverRequest { *The caching configuration for the resolver.
*/ cachingConfig?: CachingConfig; + + /** + *The maximum batching size for a resolver.
+ */ + maxBatchSize?: number; } export namespace CreateResolverRequest { @@ -2215,6 +2230,11 @@ export interface Resolver { *The caching configuration for the resolver.
*/ cachingConfig?: CachingConfig; + + /** + *The maximum batching size for a resolver.
+ */ + maxBatchSize?: number; } export namespace Resolver { @@ -3934,6 +3954,11 @@ export interface UpdateFunctionRequest { * resolver is invoked. */ syncConfig?: SyncConfig; + + /** + *The maximum batching size for a resolver.
+ */ + maxBatchSize?: number; } export namespace UpdateFunctionRequest { @@ -4107,6 +4132,11 @@ export interface UpdateResolverRequest { *The caching configuration for the resolver.
*/ cachingConfig?: CachingConfig; + + /** + *The maximum batching size for a resolver.
+ */ + maxBatchSize?: number; } export namespace UpdateResolverRequest { diff --git a/clients/client-appsync/src/protocols/Aws_restJson1.ts b/clients/client-appsync/src/protocols/Aws_restJson1.ts index 875df7aa1e95..9a69a7595de9 100644 --- a/clients/client-appsync/src/protocols/Aws_restJson1.ts +++ b/clients/client-appsync/src/protocols/Aws_restJson1.ts @@ -353,6 +353,7 @@ export const serializeAws_restJson1CreateFunctionCommand = async ( ...(input.description !== undefined && input.description !== null && { description: input.description }), ...(input.functionVersion !== undefined && input.functionVersion !== null && { functionVersion: input.functionVersion }), + ...(input.maxBatchSize !== undefined && input.maxBatchSize !== null && { maxBatchSize: input.maxBatchSize }), ...(input.name !== undefined && input.name !== null && { name: input.name }), ...(input.requestMappingTemplate !== undefined && input.requestMappingTemplate !== null && { requestMappingTemplate: input.requestMappingTemplate }), @@ -460,6 +461,7 @@ export const serializeAws_restJson1CreateResolverCommand = async ( input.dataSourceName !== null && { dataSourceName: input.dataSourceName }), ...(input.fieldName !== undefined && input.fieldName !== null && { fieldName: input.fieldName }), ...(input.kind !== undefined && input.kind !== null && { kind: input.kind }), + ...(input.maxBatchSize !== undefined && input.maxBatchSize !== null && { maxBatchSize: input.maxBatchSize }), ...(input.pipelineConfig !== undefined && input.pipelineConfig !== null && { pipelineConfig: serializeAws_restJson1PipelineConfig(input.pipelineConfig, context), @@ -1828,6 +1830,7 @@ export const serializeAws_restJson1UpdateFunctionCommand = async ( ...(input.description !== undefined && input.description !== null && { description: input.description }), ...(input.functionVersion !== undefined && input.functionVersion !== null && { functionVersion: input.functionVersion }), + ...(input.maxBatchSize !== undefined && input.maxBatchSize !== null && { maxBatchSize: input.maxBatchSize }), ...(input.name !== undefined && input.name !== null && { name: input.name }), ...(input.requestMappingTemplate !== undefined && input.requestMappingTemplate !== null && { requestMappingTemplate: input.requestMappingTemplate }), @@ -1951,6 +1954,7 @@ export const serializeAws_restJson1UpdateResolverCommand = async ( ...(input.dataSourceName !== undefined && input.dataSourceName !== null && { dataSourceName: input.dataSourceName }), ...(input.kind !== undefined && input.kind !== null && { kind: input.kind }), + ...(input.maxBatchSize !== undefined && input.maxBatchSize !== null && { maxBatchSize: input.maxBatchSize }), ...(input.pipelineConfig !== undefined && input.pipelineConfig !== null && { pipelineConfig: serializeAws_restJson1PipelineConfig(input.pipelineConfig, context), @@ -6809,6 +6813,7 @@ const deserializeAws_restJson1FunctionConfiguration = (output: any, context: __S functionArn: __expectString(output.functionArn), functionId: __expectString(output.functionId), functionVersion: __expectString(output.functionVersion), + maxBatchSize: __expectInt32(output.maxBatchSize), name: __expectString(output.name), requestMappingTemplate: __expectString(output.requestMappingTemplate), responseMappingTemplate: __expectString(output.responseMappingTemplate), @@ -7013,6 +7018,7 @@ const deserializeAws_restJson1Resolver = (output: any, context: __SerdeContext): dataSourceName: __expectString(output.dataSourceName), fieldName: __expectString(output.fieldName), kind: __expectString(output.kind), + maxBatchSize: __expectInt32(output.maxBatchSize), pipelineConfig: output.pipelineConfig !== undefined && output.pipelineConfig !== null ? deserializeAws_restJson1PipelineConfig(output.pipelineConfig, context) diff --git a/clients/client-cloudtrail/src/CloudTrail.ts b/clients/client-cloudtrail/src/CloudTrail.ts index d5102696b068..6cb488a5072f 100644 --- a/clients/client-cloudtrail/src/CloudTrail.ts +++ b/clients/client-cloudtrail/src/CloudTrail.ts @@ -2,13 +2,34 @@ import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; import { CloudTrailClient } from "./CloudTrailClient"; import { AddTagsCommand, AddTagsCommandInput, AddTagsCommandOutput } from "./commands/AddTagsCommand"; +import { CancelQueryCommand, CancelQueryCommandInput, CancelQueryCommandOutput } from "./commands/CancelQueryCommand"; +import { + CreateEventDataStoreCommand, + CreateEventDataStoreCommandInput, + CreateEventDataStoreCommandOutput, +} from "./commands/CreateEventDataStoreCommand"; import { CreateTrailCommand, CreateTrailCommandInput, CreateTrailCommandOutput } from "./commands/CreateTrailCommand"; +import { + DeleteEventDataStoreCommand, + DeleteEventDataStoreCommandInput, + DeleteEventDataStoreCommandOutput, +} from "./commands/DeleteEventDataStoreCommand"; import { DeleteTrailCommand, DeleteTrailCommandInput, DeleteTrailCommandOutput } from "./commands/DeleteTrailCommand"; +import { + DescribeQueryCommand, + DescribeQueryCommandInput, + DescribeQueryCommandOutput, +} from "./commands/DescribeQueryCommand"; import { DescribeTrailsCommand, DescribeTrailsCommandInput, DescribeTrailsCommandOutput, } from "./commands/DescribeTrailsCommand"; +import { + GetEventDataStoreCommand, + GetEventDataStoreCommandInput, + GetEventDataStoreCommandOutput, +} from "./commands/GetEventDataStoreCommand"; import { GetEventSelectorsCommand, GetEventSelectorsCommandInput, @@ -19,17 +40,28 @@ import { GetInsightSelectorsCommandInput, GetInsightSelectorsCommandOutput, } from "./commands/GetInsightSelectorsCommand"; +import { + GetQueryResultsCommand, + GetQueryResultsCommandInput, + GetQueryResultsCommandOutput, +} from "./commands/GetQueryResultsCommand"; import { GetTrailCommand, GetTrailCommandInput, GetTrailCommandOutput } from "./commands/GetTrailCommand"; import { GetTrailStatusCommand, GetTrailStatusCommandInput, GetTrailStatusCommandOutput, } from "./commands/GetTrailStatusCommand"; +import { + ListEventDataStoresCommand, + ListEventDataStoresCommandInput, + ListEventDataStoresCommandOutput, +} from "./commands/ListEventDataStoresCommand"; import { ListPublicKeysCommand, ListPublicKeysCommandInput, ListPublicKeysCommandOutput, } from "./commands/ListPublicKeysCommand"; +import { ListQueriesCommand, ListQueriesCommandInput, ListQueriesCommandOutput } from "./commands/ListQueriesCommand"; import { ListTagsCommand, ListTagsCommandInput, ListTagsCommandOutput } from "./commands/ListTagsCommand"; import { ListTrailsCommand, ListTrailsCommandInput, ListTrailsCommandOutput } from "./commands/ListTrailsCommand"; import { @@ -48,12 +80,23 @@ import { PutInsightSelectorsCommandOutput, } from "./commands/PutInsightSelectorsCommand"; import { RemoveTagsCommand, RemoveTagsCommandInput, RemoveTagsCommandOutput } from "./commands/RemoveTagsCommand"; +import { + RestoreEventDataStoreCommand, + RestoreEventDataStoreCommandInput, + RestoreEventDataStoreCommandOutput, +} from "./commands/RestoreEventDataStoreCommand"; import { StartLoggingCommand, StartLoggingCommandInput, StartLoggingCommandOutput, } from "./commands/StartLoggingCommand"; +import { StartQueryCommand, StartQueryCommandInput, StartQueryCommandOutput } from "./commands/StartQueryCommand"; import { StopLoggingCommand, StopLoggingCommandInput, StopLoggingCommandOutput } from "./commands/StopLoggingCommand"; +import { + UpdateEventDataStoreCommand, + UpdateEventDataStoreCommandInput, + UpdateEventDataStoreCommandOutput, +} from "./commands/UpdateEventDataStoreCommand"; import { UpdateTrailCommand, UpdateTrailCommandInput, UpdateTrailCommandOutput } from "./commands/UpdateTrailCommand"; /** @@ -104,6 +147,66 @@ export class CloudTrail extends CloudTrailClient { } } + /** + *Cancels a query if the query is not in a terminated state, such as CANCELLED, FAILED or FINISHED. You must specify an ARN value for EventDataStore.
+ * The ID of the query that you want to cancel is also required. When you run CancelQuery, the query status might
+ * show as CANCELLED even if the operation is not yet finished.
Creates a new event data store.
+ */ + public createEventDataStore( + args: CreateEventDataStoreCommandInput, + options?: __HttpHandlerOptions + ): PromiseCreates a trail that specifies the settings for delivery of log data to an Amazon S3 bucket. *
@@ -131,6 +234,44 @@ export class CloudTrail extends CloudTrailClient { } } + /** + *Disables the event data store specified by EventDataStore, which accepts an event data store ARN.
+ * After you run DeleteEventDataStore, the event data store is automatically deleted after a wait period of
+ * seven days. TerminationProtectionEnabled must be set to False on the event data store; this
+ * operation cannot work if TerminationProtectionEnabled is True.
After you run DeleteEventDataStore on an event data store, you cannot run ListQueries,
+ * DescribeQuery, or GetQueryResults on queries that are using an event data store in a
+ * PENDING_DELETION state.
Deletes a trail. This operation must be called from the region in which the trail was
* created. DeleteTrail cannot be called on the shadow trails (replicated trails
@@ -159,6 +300,39 @@ export class CloudTrail extends CloudTrailClient {
}
}
+ /**
+ *
Returns metadata about a query, including query run time in milliseconds, number of events scanned and matched, and query
+ * status. You must specify an ARN for EventDataStore, and a value for QueryID.
Retrieves settings for one or more trails associated with the current region for your account.
*/ @@ -191,6 +365,38 @@ export class CloudTrail extends CloudTrailClient { } } + /** + *Returns information about an event data store specified as either an ARN or the ID portion of the ARN.
+ */ + public getEventDataStore( + args: GetEventDataStoreCommandInput, + options?: __HttpHandlerOptions + ): PromiseDescribes the settings for the event selectors that you configured for your trail. * The information returned for your event selectors includes the following:
@@ -277,6 +483,39 @@ export class CloudTrail extends CloudTrailClient { } } + /** + *Gets event data results of a query. You must specify the QueryID value returned by the StartQuery
+ * operation, and an ARN for EventDataStore.
Returns settings information for a specified trail.
*/ @@ -335,6 +574,38 @@ export class CloudTrail extends CloudTrailClient { } } + /** + *Returns information about all event data stores in the account, in the current region.
+ */ + public listEventDataStores( + args: ListEventDataStoresCommandInput, + options?: __HttpHandlerOptions + ): PromiseReturns all public keys whose private keys were used to sign the digest files within the specified time range. The public key is needed to validate digest files that were signed with its corresponding private key.
*Returns a list of queries and query statuses for the past seven days. You must specify an ARN value for
+ * EventDataStore. Optionally, to shorten the list of results, you can specify a time range,
+ * formatted as timestamps, by adding StartTime and EndTime parameters, and a
+ * QueryStatus value. Valid values for QueryStatus include QUEUED, RUNNING,
+ * FINISHED, FAILED, or CANCELLED.
Lists the tags for the trail in the current region.
*/ @@ -580,7 +881,7 @@ export class CloudTrail extends CloudTrailClient { *Lets you enable Insights event logging by specifying the Insights
* selectors that you want to enable on an existing trail. You also use
* PutInsightSelectors to turn off Insights event logging, by passing an empty list of insight types.
- * The valid Insights event type in this release is ApiCallRateInsight.
ApiErrorRateInsight and ApiCallRateInsight.
*/
public putInsightSelectors(
args: PutInsightSelectorsCommandInput,
@@ -637,6 +938,40 @@ export class CloudTrail extends CloudTrailClient {
}
}
+ /**
+ * Restores a deleted event data store specified by EventDataStore, which accepts an event data store ARN.
+ * You can only restore a deleted event data store within the seven-day wait period after deletion. Restoring an event data store
+ * can take several minutes, depending on the size of the event data store.
Starts the recording of Amazon Web Services API calls and log file delivery for a trail. For a trail that is enabled in all regions, this operation must be called from the region in which the trail was created. This operation cannot be called on the shadow trails (replicated trails in other regions) of a trail that is enabled in all regions.
*/ @@ -666,6 +1001,33 @@ export class CloudTrail extends CloudTrailClient { } } + /** + *Starts a CloudTrail Lake query. The required QueryStatement
+ * parameter provides your SQL query, enclosed in single quotation marks.
Suspends the recording of Amazon Web Services API calls and log file delivery for the specified trail. * Under most circumstances, there is no need to use this action. You can update a trail @@ -698,6 +1060,43 @@ export class CloudTrail extends CloudTrailClient { } } + /** + *
Updates an event data store. The required EventDataStore value is an ARN or the ID portion of the ARN.
+ * Other parameters are optional, but at least one optional parameter must be specified, or CloudTrail throws an error.
+ * RetentionPeriod is in days, and valid values are integers between 90 and 2555.
+ * By default, TerminationProtection is enabled. AdvancedEventSelectors includes or excludes management
+ * and data events in your event data store; for more information about AdvancedEventSelectors, see
+ * PutEventSelectorsRequest$AdvancedEventSelectors.
Updates trail settings that control what events you are logging, and how to handle log files. Changes to a trail do not require * stopping the CloudTrail service. Use this action to designate an existing bucket for log diff --git a/clients/client-cloudtrail/src/CloudTrailClient.ts b/clients/client-cloudtrail/src/CloudTrailClient.ts index b6aeadcddebc..9902558036dc 100644 --- a/clients/client-cloudtrail/src/CloudTrailClient.ts +++ b/clients/client-cloudtrail/src/CloudTrailClient.ts @@ -50,17 +50,34 @@ import { } from "@aws-sdk/types"; import { AddTagsCommandInput, AddTagsCommandOutput } from "./commands/AddTagsCommand"; +import { CancelQueryCommandInput, CancelQueryCommandOutput } from "./commands/CancelQueryCommand"; +import { + CreateEventDataStoreCommandInput, + CreateEventDataStoreCommandOutput, +} from "./commands/CreateEventDataStoreCommand"; import { CreateTrailCommandInput, CreateTrailCommandOutput } from "./commands/CreateTrailCommand"; +import { + DeleteEventDataStoreCommandInput, + DeleteEventDataStoreCommandOutput, +} from "./commands/DeleteEventDataStoreCommand"; import { DeleteTrailCommandInput, DeleteTrailCommandOutput } from "./commands/DeleteTrailCommand"; +import { DescribeQueryCommandInput, DescribeQueryCommandOutput } from "./commands/DescribeQueryCommand"; import { DescribeTrailsCommandInput, DescribeTrailsCommandOutput } from "./commands/DescribeTrailsCommand"; +import { GetEventDataStoreCommandInput, GetEventDataStoreCommandOutput } from "./commands/GetEventDataStoreCommand"; import { GetEventSelectorsCommandInput, GetEventSelectorsCommandOutput } from "./commands/GetEventSelectorsCommand"; import { GetInsightSelectorsCommandInput, GetInsightSelectorsCommandOutput, } from "./commands/GetInsightSelectorsCommand"; +import { GetQueryResultsCommandInput, GetQueryResultsCommandOutput } from "./commands/GetQueryResultsCommand"; import { GetTrailCommandInput, GetTrailCommandOutput } from "./commands/GetTrailCommand"; import { GetTrailStatusCommandInput, GetTrailStatusCommandOutput } from "./commands/GetTrailStatusCommand"; +import { + ListEventDataStoresCommandInput, + ListEventDataStoresCommandOutput, +} from "./commands/ListEventDataStoresCommand"; import { ListPublicKeysCommandInput, ListPublicKeysCommandOutput } from "./commands/ListPublicKeysCommand"; +import { ListQueriesCommandInput, ListQueriesCommandOutput } from "./commands/ListQueriesCommand"; import { ListTagsCommandInput, ListTagsCommandOutput } from "./commands/ListTagsCommand"; import { ListTrailsCommandInput, ListTrailsCommandOutput } from "./commands/ListTrailsCommand"; import { LookupEventsCommandInput, LookupEventsCommandOutput } from "./commands/LookupEventsCommand"; @@ -70,49 +87,80 @@ import { PutInsightSelectorsCommandOutput, } from "./commands/PutInsightSelectorsCommand"; import { RemoveTagsCommandInput, RemoveTagsCommandOutput } from "./commands/RemoveTagsCommand"; +import { + RestoreEventDataStoreCommandInput, + RestoreEventDataStoreCommandOutput, +} from "./commands/RestoreEventDataStoreCommand"; import { StartLoggingCommandInput, StartLoggingCommandOutput } from "./commands/StartLoggingCommand"; +import { StartQueryCommandInput, StartQueryCommandOutput } from "./commands/StartQueryCommand"; import { StopLoggingCommandInput, StopLoggingCommandOutput } from "./commands/StopLoggingCommand"; +import { + UpdateEventDataStoreCommandInput, + UpdateEventDataStoreCommandOutput, +} from "./commands/UpdateEventDataStoreCommand"; import { UpdateTrailCommandInput, UpdateTrailCommandOutput } from "./commands/UpdateTrailCommand"; import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig"; export type ServiceInputTypes = | AddTagsCommandInput + | CancelQueryCommandInput + | CreateEventDataStoreCommandInput | CreateTrailCommandInput + | DeleteEventDataStoreCommandInput | DeleteTrailCommandInput + | DescribeQueryCommandInput | DescribeTrailsCommandInput + | GetEventDataStoreCommandInput | GetEventSelectorsCommandInput | GetInsightSelectorsCommandInput + | GetQueryResultsCommandInput | GetTrailCommandInput | GetTrailStatusCommandInput + | ListEventDataStoresCommandInput | ListPublicKeysCommandInput + | ListQueriesCommandInput | ListTagsCommandInput | ListTrailsCommandInput | LookupEventsCommandInput | PutEventSelectorsCommandInput | PutInsightSelectorsCommandInput | RemoveTagsCommandInput + | RestoreEventDataStoreCommandInput | StartLoggingCommandInput + | StartQueryCommandInput | StopLoggingCommandInput + | UpdateEventDataStoreCommandInput | UpdateTrailCommandInput; export type ServiceOutputTypes = | AddTagsCommandOutput + | CancelQueryCommandOutput + | CreateEventDataStoreCommandOutput | CreateTrailCommandOutput + | DeleteEventDataStoreCommandOutput | DeleteTrailCommandOutput + | DescribeQueryCommandOutput | DescribeTrailsCommandOutput + | GetEventDataStoreCommandOutput | GetEventSelectorsCommandOutput | GetInsightSelectorsCommandOutput + | GetQueryResultsCommandOutput | GetTrailCommandOutput | GetTrailStatusCommandOutput + | ListEventDataStoresCommandOutput | ListPublicKeysCommandOutput + | ListQueriesCommandOutput | ListTagsCommandOutput | ListTrailsCommandOutput | LookupEventsCommandOutput | PutEventSelectorsCommandOutput | PutInsightSelectorsCommandOutput | RemoveTagsCommandOutput + | RestoreEventDataStoreCommandOutput | StartLoggingCommandOutput + | StartQueryCommandOutput | StopLoggingCommandOutput + | UpdateEventDataStoreCommandOutput | UpdateTrailCommandOutput; export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { diff --git a/clients/client-cloudtrail/src/commands/CancelQueryCommand.ts b/clients/client-cloudtrail/src/commands/CancelQueryCommand.ts new file mode 100644 index 000000000000..767926d2bd96 --- /dev/null +++ b/clients/client-cloudtrail/src/commands/CancelQueryCommand.ts @@ -0,0 +1,97 @@ +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { CloudTrailClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudTrailClient"; +import { CancelQueryRequest, CancelQueryResponse } from "../models/models_0"; +import { + deserializeAws_json1_1CancelQueryCommand, + serializeAws_json1_1CancelQueryCommand, +} from "../protocols/Aws_json1_1"; + +export interface CancelQueryCommandInput extends CancelQueryRequest {} +export interface CancelQueryCommandOutput extends CancelQueryResponse, __MetadataBearer {} + +/** + *
Cancels a query if the query is not in a terminated state, such as CANCELLED, FAILED or FINISHED. You must specify an ARN value for EventDataStore.
+ * The ID of the query that you want to cancel is also required. When you run CancelQuery, the query status might
+ * show as CANCELLED even if the operation is not yet finished.
Creates a new event data store.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudTrailClient, CreateEventDataStoreCommand } from "@aws-sdk/client-cloudtrail"; // ES Modules import + * // const { CloudTrailClient, CreateEventDataStoreCommand } = require("@aws-sdk/client-cloudtrail"); // CommonJS import + * const client = new CloudTrailClient(config); + * const command = new CreateEventDataStoreCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link CreateEventDataStoreCommandInput} for command's `input` shape. + * @see {@link CreateEventDataStoreCommandOutput} for command's `response` shape. + * @see {@link CloudTrailClientResolvedConfig | config} for CloudTrailClient's `config` shape. + * + */ +export class CreateEventDataStoreCommand extends $Command< + CreateEventDataStoreCommandInput, + CreateEventDataStoreCommandOutput, + CloudTrailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateEventDataStoreCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackDisables the event data store specified by EventDataStore, which accepts an event data store ARN.
+ * After you run DeleteEventDataStore, the event data store is automatically deleted after a wait period of
+ * seven days. TerminationProtectionEnabled must be set to False on the event data store; this
+ * operation cannot work if TerminationProtectionEnabled is True.
After you run DeleteEventDataStore on an event data store, you cannot run ListQueries,
+ * DescribeQuery, or GetQueryResults on queries that are using an event data store in a
+ * PENDING_DELETION state.
Returns metadata about a query, including query run time in milliseconds, number of events scanned and matched, and query
+ * status. You must specify an ARN for EventDataStore, and a value for QueryID.
Returns information about an event data store specified as either an ARN or the ID portion of the ARN.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudTrailClient, GetEventDataStoreCommand } from "@aws-sdk/client-cloudtrail"; // ES Modules import + * // const { CloudTrailClient, GetEventDataStoreCommand } = require("@aws-sdk/client-cloudtrail"); // CommonJS import + * const client = new CloudTrailClient(config); + * const command = new GetEventDataStoreCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link GetEventDataStoreCommandInput} for command's `input` shape. + * @see {@link GetEventDataStoreCommandOutput} for command's `response` shape. + * @see {@link CloudTrailClientResolvedConfig | config} for CloudTrailClient's `config` shape. + * + */ +export class GetEventDataStoreCommand extends $Command< + GetEventDataStoreCommandInput, + GetEventDataStoreCommandOutput, + CloudTrailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetEventDataStoreCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackGets event data results of a query. You must specify the QueryID value returned by the StartQuery
+ * operation, and an ARN for EventDataStore.
Returns information about all event data stores in the account, in the current region.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { CloudTrailClient, ListEventDataStoresCommand } from "@aws-sdk/client-cloudtrail"; // ES Modules import + * // const { CloudTrailClient, ListEventDataStoresCommand } = require("@aws-sdk/client-cloudtrail"); // CommonJS import + * const client = new CloudTrailClient(config); + * const command = new ListEventDataStoresCommand(input); + * const response = await client.send(command); + * ``` + * + * @see {@link ListEventDataStoresCommandInput} for command's `input` shape. + * @see {@link ListEventDataStoresCommandOutput} for command's `response` shape. + * @see {@link CloudTrailClientResolvedConfig | config} for CloudTrailClient's `config` shape. + * + */ +export class ListEventDataStoresCommand extends $Command< + ListEventDataStoresCommandInput, + ListEventDataStoresCommandOutput, + CloudTrailClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListEventDataStoresCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackReturns a list of queries and query statuses for the past seven days. You must specify an ARN value for
+ * EventDataStore. Optionally, to shorten the list of results, you can specify a time range,
+ * formatted as timestamps, by adding StartTime and EndTime parameters, and a
+ * QueryStatus value. Valid values for QueryStatus include QUEUED, RUNNING,
+ * FINISHED, FAILED, or CANCELLED.
Lets you enable Insights event logging by specifying the Insights
* selectors that you want to enable on an existing trail. You also use
* PutInsightSelectors to turn off Insights event logging, by passing an empty list of insight types.
- * The valid Insights event type in this release is ApiCallRateInsight.
ApiErrorRateInsight and ApiCallRateInsight.
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
diff --git a/clients/client-cloudtrail/src/commands/RestoreEventDataStoreCommand.ts b/clients/client-cloudtrail/src/commands/RestoreEventDataStoreCommand.ts
new file mode 100644
index 000000000000..a654733fb9a7
--- /dev/null
+++ b/clients/client-cloudtrail/src/commands/RestoreEventDataStoreCommand.ts
@@ -0,0 +1,97 @@
+import { getSerdePlugin } from "@aws-sdk/middleware-serde";
+import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http";
+import { Command as $Command } from "@aws-sdk/smithy-client";
+import {
+ FinalizeHandlerArguments,
+ Handler,
+ HandlerExecutionContext,
+ HttpHandlerOptions as __HttpHandlerOptions,
+ MetadataBearer as __MetadataBearer,
+ MiddlewareStack,
+ SerdeContext as __SerdeContext,
+} from "@aws-sdk/types";
+
+import { CloudTrailClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudTrailClient";
+import { RestoreEventDataStoreRequest, RestoreEventDataStoreResponse } from "../models/models_0";
+import {
+ deserializeAws_json1_1RestoreEventDataStoreCommand,
+ serializeAws_json1_1RestoreEventDataStoreCommand,
+} from "../protocols/Aws_json1_1";
+
+export interface RestoreEventDataStoreCommandInput extends RestoreEventDataStoreRequest {}
+export interface RestoreEventDataStoreCommandOutput extends RestoreEventDataStoreResponse, __MetadataBearer {}
+
+/**
+ * Restores a deleted event data store specified by EventDataStore, which accepts an event data store ARN.
+ * You can only restore a deleted event data store within the seven-day wait period after deletion. Restoring an event data store
+ * can take several minutes, depending on the size of the event data store.
Starts a CloudTrail Lake query. The required QueryStatement
+ * parameter provides your SQL query, enclosed in single quotation marks.
Updates an event data store. The required EventDataStore value is an ARN or the ID portion of the ARN.
+ * Other parameters are optional, but at least one optional parameter must be specified, or CloudTrail throws an error.
+ * RetentionPeriod is in days, and valid values are integers between 90 and 2555.
+ * By default, TerminationProtection is enabled. AdvancedEventSelectors includes or excludes management
+ * and data events in your event data store; for more information about AdvancedEventSelectors, see
+ * PutEventSelectorsRequest$AdvancedEventSelectors.
Contains a list of tags, up to a limit of 50
*/ - TagsList?: Tag[]; + TagsList: Tag[] | undefined; } export namespace AddTagsRequest { @@ -90,6 +90,71 @@ export namespace CloudTrailARNInvalidException { }); } +/** + *This exception is thrown when the specified resource is not ready for an operation. + * This can occur when you try to run an operation on a trail before CloudTrail has time to fully load the trail. + * If this exception occurs, wait a few minutes, and then try the operation again.
+ */ +export interface ConflictException extends __SmithyException, $MetadataBearer { + name: "ConflictException"; + $fault: "client"; + /** + *Brief description of the exception returned by the request.
+ */ + Message?: string; +} + +export namespace ConflictException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ConflictException): any => ({ + ...obj, + }); +} + +/** + *The specified event data store was not found.
+ */ +export interface EventDataStoreNotFoundException extends __SmithyException, $MetadataBearer { + name: "EventDataStoreNotFoundException"; + $fault: "client"; + /** + *Brief description of the exception returned by the request.
+ */ + Message?: string; +} + +export namespace EventDataStoreNotFoundException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: EventDataStoreNotFoundException): any => ({ + ...obj, + }); +} + +/** + *The event data store against which you ran your query is inactive.
+ */ +export interface InactiveEventDataStoreException extends __SmithyException, $MetadataBearer { + name: "InactiveEventDataStoreException"; + $fault: "client"; + /** + *Brief description of the exception returned by the request.
+ */ + Message?: string; +} + +export namespace InactiveEventDataStoreException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InactiveEventDataStoreException): any => ({ + ...obj, + }); +} + /** *This exception is thrown when the specified tag key or values are not valid. * It can also occur if there are duplicate tags or too many tags on the resource.
@@ -604,13 +669,63 @@ export namespace AdvancedEventSelector { }); } +export interface CancelQueryRequest { + /** + *The ARN (or the ID suffix of the ARN) of an event data store on which the specified query is running.
+ */ + EventDataStore: string | undefined; + + /** + *The ID of the query that you want to cancel. The QueryId comes from the response of a StartQuery
+ * operation.
The ID of the canceled query.
+ */ + QueryId: string | undefined; + + /** + *Shows the status of a query after a CancelQuery request. Typically, the values shown are either
+ * RUNNING or CANCELLED.
This exception is thrown when trusted access has not been enabled between CloudTrail and Organizations. For more information, - * see Enabling Trusted Access with Other Amazon Web Services Services - * and Prepare For Creating a Trail For Your Organization.
+ *The specified event data store ARN is not valid or does not map to an event data store in your account.
*/ -export interface CloudTrailAccessNotEnabledException extends __SmithyException, $MetadataBearer { - name: "CloudTrailAccessNotEnabledException"; +export interface EventDataStoreARNInvalidException extends __SmithyException, $MetadataBearer { + name: "EventDataStoreARNInvalidException"; $fault: "client"; /** *Brief description of the exception returned by the request.
@@ -618,22 +733,21 @@ export interface CloudTrailAccessNotEnabledException extends __SmithyException, Message?: string; } -export namespace CloudTrailAccessNotEnabledException { +export namespace EventDataStoreARNInvalidException { /** * @internal */ - export const filterSensitiveLog = (obj: CloudTrailAccessNotEnabledException): any => ({ + export const filterSensitiveLog = (obj: EventDataStoreARNInvalidException): any => ({ ...obj, }); } /** - *This exception is thrown when a call results in the InvalidClientTokenId error code.
- * This can occur when you are creating or updating a trail to send notifications to an Amazon SNS topic that
- * is in a suspended Amazon Web Services account.
The specified query cannot be canceled because it is in the FINISHED, FAILED, or
+ * CANCELLED state.
Brief description of the exception returned by the request.
@@ -641,20 +755,20 @@ export interface CloudTrailInvalidClientTokenIdException extends __SmithyExcepti Message?: string; } -export namespace CloudTrailInvalidClientTokenIdException { +export namespace InactiveQueryException { /** * @internal */ - export const filterSensitiveLog = (obj: CloudTrailInvalidClientTokenIdException): any => ({ + export const filterSensitiveLog = (obj: InactiveQueryException): any => ({ ...obj, }); } /** - *Cannot set a CloudWatch Logs delivery for this region.
+ *The request includes a parameter that is not valid.
*/ -export interface CloudWatchLogsDeliveryUnavailableException extends __SmithyException, $MetadataBearer { - name: "CloudWatchLogsDeliveryUnavailableException"; +export interface InvalidParameterException extends __SmithyException, $MetadataBearer { + name: "InvalidParameterException"; $fault: "client"; /** *Brief description of the exception returned by the request.
@@ -662,122 +776,94 @@ export interface CloudWatchLogsDeliveryUnavailableException extends __SmithyExce Message?: string; } -export namespace CloudWatchLogsDeliveryUnavailableException { +export namespace InvalidParameterException { /** * @internal */ - export const filterSensitiveLog = (obj: CloudWatchLogsDeliveryUnavailableException): any => ({ + export const filterSensitiveLog = (obj: InvalidParameterException): any => ({ ...obj, }); } /** - *Specifies the settings for each trail.
+ *The query ID does not exist or does not map to a query.
*/ -export interface CreateTrailRequest { - /** - *Specifies the name of the trail. The name must meet the following requirements:
- *Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
- *Start with a letter or number, and end with a letter or number
- *Be between 3 and 128 characters
- *Have no adjacent periods, underscores or dashes. Names like my-_namespace
- * and my--namespace are not valid.
Not be in IP address format (for example, 192.168.5.4)
- *Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements.
+ *Brief description of the exception returned by the request.
*/ - S3BucketName: string | undefined; + Message?: string; +} +export namespace QueryIdNotFoundException { /** - *Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated - * for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.
+ * @internal */ - S3KeyPrefix?: string; + export const filterSensitiveLog = (obj: QueryIdNotFoundException): any => ({ + ...obj, + }); +} +/** + *This exception is thrown when trusted access has not been enabled between CloudTrail and Organizations. For more information, + * see Enabling Trusted Access with Other Amazon Web Services Services + * and Prepare For Creating a Trail For Your Organization.
+ */ +export interface CloudTrailAccessNotEnabledException extends __SmithyException, $MetadataBearer { + name: "CloudTrailAccessNotEnabledException"; + $fault: "client"; /** - *Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
+ *Brief description of the exception returned by the request.
*/ - SnsTopicName?: string; + Message?: string; +} +export namespace CloudTrailAccessNotEnabledException { /** - *Specifies whether the trail is publishing events from global services such as IAM to the log files.
+ * @internal */ - IncludeGlobalServiceEvents?: boolean; + export const filterSensitiveLog = (obj: CloudTrailAccessNotEnabledException): any => ({ + ...obj, + }); +} +export interface CreateEventDataStoreRequest { /** - *Specifies whether the trail is created in the current region or in all regions. The default is false, which creates a trail only in the region where you are signed in. As a best practice, consider - * creating trails that log events in all regions.
+ *The name of the event data store.
*/ - IsMultiRegionTrail?: boolean; + Name: string | undefined; /** - *Specifies whether log file integrity validation is enabled. The default is false.
- *When you disable log file integrity validation, the chain of digest files is broken after one hour. CloudTrail does - * not create digest files for log files that were delivered during a period in which log file integrity validation was disabled. - * For example, if you enable log file integrity validation at noon on January 1, disable it at noon on January 2, and re-enable - * it at noon on January 10, digest files will not be created for the log files delivered from noon on January 2 to noon on - * January 10. The same applies whenever you stop CloudTrail logging or delete a trail.
- *The advanced event selectors to use to select the events for the data store. For more information about how to use advanced event + * selectors, see Log events by using advanced event selectors in the CloudTrail + * User Guide.
*/ - EnableLogFileValidation?: boolean; + AdvancedEventSelectors?: AdvancedEventSelector[]; /** - *Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group
- * to which CloudTrail logs will be delivered. Not required unless you specify CloudWatchLogsRoleArn.
Specifies whether the event data store includes events from all regions, or only from the region in which the event data store + * is created.
*/ - CloudWatchLogsLogGroupArn?: string; + MultiRegionEnabled?: boolean; /** - *Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
+ *Specifies whether an event data store collects events logged for an organization in Organizations.
*/ - CloudWatchLogsRoleArn?: string; + OrganizationEnabled?: boolean; /** - *Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The - * value can be an alias name prefixed by "alias/", a fully specified ARN to an alias, a fully - * specified ARN to a key, or a globally unique identifier.
- *CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, - * see Using multi-Region keys in the Key Management Service Developer Guide.
- *Examples:
- *alias/MyAliasName
- *arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
- *arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
- *12345678-1234-1234-1234-123456789012
- *The retention period of the event data store, in days. You can set a retention period of up to 2555 days, + * the equivalent of seven years.
*/ - KmsKeyId?: string; + RetentionPeriod?: number; /** - *Specifies whether the trail is created for all accounts in an organization in Organizations, or only for the current Amazon Web Services account. - * The default is false, and cannot be true unless the call is made on behalf of an Amazon Web Services account that is the management account for an organization in - * Organizations.
+ *Specifies whether termination protection is enabled for the event data store. If termination protection is enabled, you + * cannot delete the event data store until termination protection is disabled.
*/ - IsOrganizationTrail?: boolean; + TerminationProtectionEnabled?: boolean; /** *A list of tags.
@@ -785,104 +871,126 @@ export interface CreateTrailRequest { TagsList?: Tag[]; } -export namespace CreateTrailRequest { +export namespace CreateEventDataStoreRequest { /** * @internal */ - export const filterSensitiveLog = (obj: CreateTrailRequest): any => ({ + export const filterSensitiveLog = (obj: CreateEventDataStoreRequest): any => ({ ...obj, }); } -/** - *Returns the objects or data listed below if successful. Otherwise, returns an error.
- */ -export interface CreateTrailResponse { +export enum EventDataStoreStatus { + CREATED = "CREATED", + ENABLED = "ENABLED", + PENDING_DELETION = "PENDING_DELETION", +} + +export interface CreateEventDataStoreResponse { /** - *Specifies the name of the trail.
+ *The ARN of the event data store.
*/ - Name?: string; + EventDataStoreArn?: string; /** - *Specifies the name of the Amazon S3 bucket designated for publishing log files.
+ *The name of the event data store.
*/ - S3BucketName?: string; + Name?: string; /** - *Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated - * for log file delivery. For more information, see Finding Your CloudTrail Log Files.
+ *The status of event data store creation.
*/ - S3KeyPrefix?: string; + Status?: EventDataStoreStatus | string; /** - * @deprecated - * - *This field is no longer in use. Use SnsTopicARN.
+ *The advanced event selectors that were used to select the events for the data store.
*/ - SnsTopicName?: string; + AdvancedEventSelectors?: AdvancedEventSelector[]; /** - *Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered. The format of a topic ARN is:
- *
- * arn:aws:sns:us-east-2:123456789012:MyTopic
- *
Indicates whether the event data store collects events from all regions, or only from the region in which it was created.
*/ - SnsTopicARN?: string; + MultiRegionEnabled?: boolean; /** - *Specifies whether the trail is publishing events from global services such as IAM to the log files.
+ *Indicates whether an event data store is collecting logged events for an organization in Organizations.
*/ - IncludeGlobalServiceEvents?: boolean; + OrganizationEnabled?: boolean; /** - *Specifies whether the trail exists in one region or in all regions.
+ *The retention period of an event data store, in days.
*/ - IsMultiRegionTrail?: boolean; + RetentionPeriod?: number; /** - *Specifies the ARN of the trail that was created. The format of a trail ARN - * is:
- *
- * arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
- *
Indicates whether termination protection is enabled for the event data store.
*/ - TrailARN?: string; + TerminationProtectionEnabled?: boolean; /** - *Specifies whether log file integrity validation is enabled.
+ *A list of tags.
*/ - LogFileValidationEnabled?: boolean; + TagsList?: Tag[]; /** - *Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail logs will be delivered.
+ *The timestamp that shows when the event data store was created.
*/ - CloudWatchLogsLogGroupArn?: string; + CreatedTimestamp?: Date; /** - *Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
+ *The timestamp that shows when an event data store was updated, if applicable.
+ * UpdatedTimestamp is always either the same or newer than the time shown in CreatedTimestamp.
Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. - * The value is a fully specified ARN to a KMS key in the following format.
- *
- * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
- *
An event data store with that name already exists.
+ */ +export interface EventDataStoreAlreadyExistsException extends __SmithyException, $MetadataBearer { + name: "EventDataStoreAlreadyExistsException"; + $fault: "client"; /** - *Specifies whether the trail is an organization trail.
+ *Brief description of the exception returned by the request.
*/ - IsOrganizationTrail?: boolean; + Message?: string; } -export namespace CreateTrailResponse { +export namespace EventDataStoreAlreadyExistsException { /** * @internal */ - export const filterSensitiveLog = (obj: CreateTrailResponse): any => ({ + export const filterSensitiveLog = (obj: EventDataStoreAlreadyExistsException): any => ({ + ...obj, + }); +} + +/** + *Your account has used the maximum number of event data stores.
+ */ +export interface EventDataStoreMaxLimitExceededException extends __SmithyException, $MetadataBearer { + name: "EventDataStoreMaxLimitExceededException"; + $fault: "client"; + /** + *Brief description of the exception returned by the request.
+ */ + Message?: string; +} + +export namespace EventDataStoreMaxLimitExceededException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: EventDataStoreMaxLimitExceededException): any => ({ ...obj, }); } @@ -910,6 +1018,311 @@ export namespace InsufficientDependencyServiceAccessPermissionException { }); } +/** + *This exception is thrown when Organizations is not configured to support all features. All features must be enabled in Organizations to support + * creating an organization trail. For more information, see + * Prepare For Creating a Trail For Your Organization.
+ */ +export interface OrganizationNotInAllFeaturesModeException extends __SmithyException, $MetadataBearer { + name: "OrganizationNotInAllFeaturesModeException"; + $fault: "client"; + /** + *Brief description of the exception returned by the request.
+ */ + Message?: string; +} + +export namespace OrganizationNotInAllFeaturesModeException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: OrganizationNotInAllFeaturesModeException): any => ({ + ...obj, + }); +} + +/** + *This exception is thrown when the request is made from an Amazon Web Services account that is not a member of an organization. + * To make this request, sign in using the credentials of an account that belongs to an organization.
+ */ +export interface OrganizationsNotInUseException extends __SmithyException, $MetadataBearer { + name: "OrganizationsNotInUseException"; + $fault: "client"; + /** + *Brief description of the exception returned by the request.
+ */ + Message?: string; +} + +export namespace OrganizationsNotInUseException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: OrganizationsNotInUseException): any => ({ + ...obj, + }); +} + +/** + *This exception is thrown when a call results in the InvalidClientTokenId error code.
+ * This can occur when you are creating or updating a trail to send notifications to an Amazon SNS topic that
+ * is in a suspended Amazon Web Services account.
Brief description of the exception returned by the request.
+ */ + Message?: string; +} + +export namespace CloudTrailInvalidClientTokenIdException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CloudTrailInvalidClientTokenIdException): any => ({ + ...obj, + }); +} + +/** + *Cannot set a CloudWatch Logs delivery for this region.
+ */ +export interface CloudWatchLogsDeliveryUnavailableException extends __SmithyException, $MetadataBearer { + name: "CloudWatchLogsDeliveryUnavailableException"; + $fault: "client"; + /** + *Brief description of the exception returned by the request.
+ */ + Message?: string; +} + +export namespace CloudWatchLogsDeliveryUnavailableException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CloudWatchLogsDeliveryUnavailableException): any => ({ + ...obj, + }); +} + +/** + *Specifies the settings for each trail.
+ */ +export interface CreateTrailRequest { + /** + *Specifies the name of the trail. The name must meet the following requirements:
+ *Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.), underscores (_), or dashes (-)
+ *Start with a letter or number, and end with a letter or number
+ *Be between 3 and 128 characters
+ *Have no adjacent periods, underscores or dashes. Names like my-_namespace
+ * and my--namespace are not valid.
Not be in IP address format (for example, 192.168.5.4)
+ *Specifies the name of the Amazon S3 bucket designated for publishing log files. See Amazon S3 Bucket Naming Requirements.
+ */ + S3BucketName: string | undefined; + + /** + *Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated + * for log file delivery. For more information, see Finding Your CloudTrail Log Files. The maximum length is 200 characters.
+ */ + S3KeyPrefix?: string; + + /** + *Specifies the name of the Amazon SNS topic defined for notification of log file delivery. The maximum length is 256 characters.
+ */ + SnsTopicName?: string; + + /** + *Specifies whether the trail is publishing events from global services such as IAM to the log files.
+ */ + IncludeGlobalServiceEvents?: boolean; + + /** + *Specifies whether the trail is created in the current region or in all regions. The default is false, which creates a trail only in the region where you are signed in. As a best practice, consider + * creating trails that log events in all regions.
+ */ + IsMultiRegionTrail?: boolean; + + /** + *Specifies whether log file integrity validation is enabled. The default is false.
+ *When you disable log file integrity validation, the chain of digest files is broken after one hour. CloudTrail does + * not create digest files for log files that were delivered during a period in which log file integrity validation was disabled. + * For example, if you enable log file integrity validation at noon on January 1, disable it at noon on January 2, and re-enable + * it at noon on January 10, digest files will not be created for the log files delivered from noon on January 2 to noon on + * January 10. The same applies whenever you stop CloudTrail logging or delete a trail.
+ *Specifies a log group name using an Amazon Resource Name (ARN), a unique identifier that represents the log group
+ * to which CloudTrail logs will be delivered. Not required unless you specify CloudWatchLogsRoleArn.
Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
+ */ + CloudWatchLogsRoleArn?: string; + + /** + *Specifies the KMS key ID to use to encrypt the logs delivered by CloudTrail. The + * value can be an alias name prefixed by "alias/", a fully specified ARN to an alias, a fully + * specified ARN to a key, or a globally unique identifier.
+ *CloudTrail also supports KMS multi-Region keys. For more information about multi-Region keys, + * see Using multi-Region keys in the Key Management Service Developer Guide.
+ *Examples:
+ *alias/MyAliasName
+ *arn:aws:kms:us-east-2:123456789012:alias/MyAliasName
+ *arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
+ *12345678-1234-1234-1234-123456789012
+ *Specifies whether the trail is created for all accounts in an organization in Organizations, or only for the current Amazon Web Services account. + * The default is false, and cannot be true unless the call is made on behalf of an Amazon Web Services account that is the management account for an organization in + * Organizations.
+ */ + IsOrganizationTrail?: boolean; + + /** + *A list of tags.
+ */ + TagsList?: Tag[]; +} + +export namespace CreateTrailRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateTrailRequest): any => ({ + ...obj, + }); +} + +/** + *Returns the objects or data listed below if successful. Otherwise, returns an error.
+ */ +export interface CreateTrailResponse { + /** + *Specifies the name of the trail.
+ */ + Name?: string; + + /** + *Specifies the name of the Amazon S3 bucket designated for publishing log files.
+ */ + S3BucketName?: string; + + /** + *Specifies the Amazon S3 key prefix that comes after the name of the bucket you have designated + * for log file delivery. For more information, see Finding Your CloudTrail Log Files.
+ */ + S3KeyPrefix?: string; + + /** + * @deprecated + * + *This field is no longer in use. Use SnsTopicARN.
+ */ + SnsTopicName?: string; + + /** + *Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send notifications when log files are delivered. The format of a topic ARN is:
+ *
+ * arn:aws:sns:us-east-2:123456789012:MyTopic
+ *
Specifies whether the trail is publishing events from global services such as IAM to the log files.
+ */ + IncludeGlobalServiceEvents?: boolean; + + /** + *Specifies whether the trail exists in one region or in all regions.
+ */ + IsMultiRegionTrail?: boolean; + + /** + *Specifies the ARN of the trail that was created. The format of a trail ARN + * is:
+ *
+ * arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
+ *
Specifies whether log file integrity validation is enabled.
+ */ + LogFileValidationEnabled?: boolean; + + /** + *Specifies the Amazon Resource Name (ARN) of the log group to which CloudTrail logs will be delivered.
+ */ + CloudWatchLogsLogGroupArn?: string; + + /** + *Specifies the role for the CloudWatch Logs endpoint to assume to write to a user's log group.
+ */ + CloudWatchLogsRoleArn?: string; + + /** + *Specifies the KMS key ID that encrypts the logs delivered by CloudTrail. + * The value is a fully specified ARN to a KMS key in the following format.
+ *
+ * arn:aws:kms:us-east-2:123456789012:key/12345678-1234-1234-1234-123456789012
+ *
Specifies whether the trail is an organization trail.
+ */ + IsOrganizationTrail?: boolean; +} + +export namespace CreateTrailResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: CreateTrailResponse): any => ({ + ...obj, + }); +} + /** *This exception is thrown when the policy on the S3 bucket or KMS key is not sufficient.
*/ @@ -1142,56 +1555,12 @@ export namespace KmsException { } /** - * @deprecated - * - *This exception is no longer in use.
- */ -export interface KmsKeyDisabledException extends __SmithyException, $MetadataBearer { - name: "KmsKeyDisabledException"; - $fault: "client"; - /** - *Brief description of the exception returned by the request.
- */ - Message?: string; -} - -export namespace KmsKeyDisabledException { - /** - * @internal - */ - export const filterSensitiveLog = (obj: KmsKeyDisabledException): any => ({ - ...obj, - }); -} - -/** - *This exception is thrown when the KMS key does not exist, when the S3 bucket and the - * KMS key are not in the same region, or when the KMS key associated with the Amazon SNS - * topic either does not exist or is not in the same region.
- */ -export interface KmsKeyNotFoundException extends __SmithyException, $MetadataBearer { - name: "KmsKeyNotFoundException"; - $fault: "client"; - /** - *Brief description of the exception returned by the request.
- */ - Message?: string; -} - -export namespace KmsKeyNotFoundException { - /** - * @internal - */ - export const filterSensitiveLog = (obj: KmsKeyNotFoundException): any => ({ - ...obj, - }); -} - -/** - *This exception is thrown when the maximum number of trails is reached.
+ * @deprecated + * + *This exception is no longer in use.
*/ -export interface MaximumNumberOfTrailsExceededException extends __SmithyException, $MetadataBearer { - name: "MaximumNumberOfTrailsExceededException"; +export interface KmsKeyDisabledException extends __SmithyException, $MetadataBearer { + name: "KmsKeyDisabledException"; $fault: "client"; /** *Brief description of the exception returned by the request.
@@ -1199,22 +1568,22 @@ export interface MaximumNumberOfTrailsExceededException extends __SmithyExceptio Message?: string; } -export namespace MaximumNumberOfTrailsExceededException { +export namespace KmsKeyDisabledException { /** * @internal */ - export const filterSensitiveLog = (obj: MaximumNumberOfTrailsExceededException): any => ({ + export const filterSensitiveLog = (obj: KmsKeyDisabledException): any => ({ ...obj, }); } /** - *This exception is thrown when Organizations is not configured to support all features. All features must be enabled in Organizations to support - * creating an organization trail. For more information, see - * Prepare For Creating a Trail For Your Organization.
+ *This exception is thrown when the KMS key does not exist, when the S3 bucket and the + * KMS key are not in the same region, or when the KMS key associated with the Amazon SNS + * topic either does not exist or is not in the same region.
*/ -export interface OrganizationNotInAllFeaturesModeException extends __SmithyException, $MetadataBearer { - name: "OrganizationNotInAllFeaturesModeException"; +export interface KmsKeyNotFoundException extends __SmithyException, $MetadataBearer { + name: "KmsKeyNotFoundException"; $fault: "client"; /** *Brief description of the exception returned by the request.
@@ -1222,21 +1591,20 @@ export interface OrganizationNotInAllFeaturesModeException extends __SmithyExcep Message?: string; } -export namespace OrganizationNotInAllFeaturesModeException { +export namespace KmsKeyNotFoundException { /** * @internal */ - export const filterSensitiveLog = (obj: OrganizationNotInAllFeaturesModeException): any => ({ + export const filterSensitiveLog = (obj: KmsKeyNotFoundException): any => ({ ...obj, }); } /** - *This exception is thrown when the request is made from an Amazon Web Services account that is not a member of an organization. - * To make this request, sign in using the credentials of an account that belongs to an organization.
+ *This exception is thrown when the maximum number of trails is reached.
*/ -export interface OrganizationsNotInUseException extends __SmithyException, $MetadataBearer { - name: "OrganizationsNotInUseException"; +export interface MaximumNumberOfTrailsExceededException extends __SmithyException, $MetadataBearer { + name: "MaximumNumberOfTrailsExceededException"; $fault: "client"; /** *Brief description of the exception returned by the request.
@@ -1244,11 +1612,11 @@ export interface OrganizationsNotInUseException extends __SmithyException, $Meta Message?: string; } -export namespace OrganizationsNotInUseException { +export namespace MaximumNumberOfTrailsExceededException { /** * @internal */ - export const filterSensitiveLog = (obj: OrganizationsNotInUseException): any => ({ + export const filterSensitiveLog = (obj: MaximumNumberOfTrailsExceededException): any => ({ ...obj, }); } @@ -1316,13 +1684,38 @@ export namespace TrailNotProvidedException { }); } +export interface DeleteEventDataStoreRequest { + /** + *The ARN (or the ID suffix of the ARN) of the event data store to delete.
+ */ + EventDataStore: string | undefined; +} + +export namespace DeleteEventDataStoreRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteEventDataStoreRequest): any => ({ + ...obj, + }); +} + +export interface DeleteEventDataStoreResponse {} + +export namespace DeleteEventDataStoreResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DeleteEventDataStoreResponse): any => ({ + ...obj, + }); +} + /** - *This exception is thrown when the specified resource is not ready for an operation. - * This can occur when you try to run an operation on a trail before CloudTrail has time to fully load the trail. - * If this exception occurs, wait a few minutes, and then try the operation again.
+ *The event data store cannot be deleted because termination protection is enabled for it.
*/ -export interface ConflictException extends __SmithyException, $MetadataBearer { - name: "ConflictException"; +export interface EventDataStoreTerminationProtectedException extends __SmithyException, $MetadataBearer { + name: "EventDataStoreTerminationProtectedException"; $fault: "client"; /** *Brief description of the exception returned by the request.
@@ -1330,11 +1723,11 @@ export interface ConflictException extends __SmithyException, $MetadataBearer { Message?: string; } -export namespace ConflictException { +export namespace EventDataStoreTerminationProtectedException { /** * @internal */ - export const filterSensitiveLog = (obj: ConflictException): any => ({ + export const filterSensitiveLog = (obj: EventDataStoreTerminationProtectedException): any => ({ ...obj, }); } @@ -1417,6 +1810,101 @@ export namespace TrailNotFoundException { }); } +export interface DescribeQueryRequest { + /** + *The ARN (or the ID suffix of the ARN) of an event data store on which the specified query was run.
+ */ + EventDataStore: string | undefined; + + /** + *The query ID.
+ */ + QueryId: string | undefined; +} + +export namespace DescribeQueryRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeQueryRequest): any => ({ + ...obj, + }); +} + +/** + *Gets metadata about a query, including the number of events that were matched, the total number of events scanned, the query run time + * in milliseconds, and the query's creation time.
+ */ +export interface QueryStatisticsForDescribeQuery { + /** + *The number of events that matched a query.
+ */ + EventsMatched?: number; + + /** + *The number of events that the query scanned in the event data store.
+ */ + EventsScanned?: number; + + /** + *The query's run time, in milliseconds.
+ */ + ExecutionTimeInMillis?: number; + + /** + *The creation time of the query.
+ */ + CreationTime?: Date; +} + +export namespace QueryStatisticsForDescribeQuery { + /** + * @internal + */ + export const filterSensitiveLog = (obj: QueryStatisticsForDescribeQuery): any => ({ + ...obj, + }); +} + +export interface DescribeQueryResponse { + /** + *The ID of the query.
+ */ + QueryId?: string; + + /** + *The SQL code of a query.
+ */ + QueryString?: string; + + /** + *The status of a query. Values for QueryStatus include QUEUED, RUNNING,
+ * FINISHED, FAILED, or CANCELLED
+ *
Metadata about a query, including the number of events that were matched, the total number of events scanned, the query run time + * in milliseconds, and the query's creation time.
+ */ + QueryStatistics?: QueryStatisticsForDescribeQuery; + + /** + *The error message returned if a query failed.
+ */ + ErrorMessage?: string; +} + +export namespace DescribeQueryResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: DescribeQueryResponse): any => ({ + ...obj, + }); +} + /** *Returns information about the trail.
*/ @@ -1592,6 +2080,83 @@ export namespace DescribeTrailsResponse { }); } +export interface GetEventDataStoreRequest { + /** + *The ARN (or ID suffix of the ARN) of the event data store about which you want information.
+ */ + EventDataStore: string | undefined; +} + +export namespace GetEventDataStoreRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: GetEventDataStoreRequest): any => ({ + ...obj, + }); +} + +export interface GetEventDataStoreResponse { + /** + *The event data store Amazon Resource Number (ARN).
+ */ + EventDataStoreArn?: string; + + /** + *The name of the event data store.
+ */ + Name?: string; + + /** + *The status of an event data store. Values can be ENABLED and PENDING_DELETION.
The advanced event selectors used to select events for the data store.
+ */ + AdvancedEventSelectors?: AdvancedEventSelector[]; + + /** + *Indicates whether the event data store includes events from all regions, or only from the region in which it was created.
+ */ + MultiRegionEnabled?: boolean; + + /** + *Indicates whether an event data store is collecting logged events for an organization in Organizations.
+ */ + OrganizationEnabled?: boolean; + + /** + *The retention period of the event data store, in days.
+ */ + RetentionPeriod?: number; + + /** + *Indicates that termination protection is enabled.
+ */ + TerminationProtectionEnabled?: boolean; + + /** + *The timestamp of the event data store's creation.
+ */ + CreatedTimestamp?: Date; + + /** + *Shows the time that an event data store was updated, if applicable. UpdatedTimestamp is always either the same or newer than the time shown in CreatedTimestamp.
Specifies the name of the trail or trail ARN. If you specify a trail name, the
@@ -1923,68 +2488,182 @@ export interface GetInsightSelectorsRequest {
* arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail
*
A JSON string that contains a list of insight types that are logged on a trail.
+ */ +export interface InsightSelector { + /** + *The type of insights to log on a trail. ApiCallRateInsight and ApiErrorRateInsight are valid insight types.
The Amazon Resource Name (ARN) of a trail for which you want to get Insights selectors.
+ */ + TrailARN?: string; + + /** + *A JSON string that contains the insight types you want to log on a trail. In this release, ApiErrorRateInsight and
+ * ApiCallRateInsight are supported as insight types.
If you run GetInsightSelectors on a trail that does not have Insights events enabled, the operation throws the exception InsightNotEnabledException.
Brief description of the exception returned by the request.
+ */ + Message?: string; +} + +export namespace InsightNotEnabledException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InsightNotEnabledException): any => ({ + ...obj, + }); +} + +export interface GetQueryResultsRequest { + /** + *The ARN (or ID suffix of the ARN) of the event data store against which the query was run.
+ */ + EventDataStore: string | undefined; + + /** + *The ID of the query for which you want to get results.
+ */ + QueryId: string | undefined; + + /** + *A token you can use to get the next page of query results.
+ */ + NextToken?: string; + + /** + *The maximum number of query results to display on a single page.
+ */ + MaxQueryResults?: number; } -export namespace GetInsightSelectorsRequest { +export namespace GetQueryResultsRequest { /** * @internal */ - export const filterSensitiveLog = (obj: GetInsightSelectorsRequest): any => ({ + export const filterSensitiveLog = (obj: GetQueryResultsRequest): any => ({ ...obj, }); } -export enum InsightType { - ApiCallRateInsight = "ApiCallRateInsight", - ApiErrorRateInsight = "ApiErrorRateInsight", -} - /** - *A JSON string that contains a list of insight types that are logged on a trail.
+ *Metadata about a query, such as the number of results.
*/ -export interface InsightSelector { +export interface QueryStatistics { /** - *The type of Insights events to log on a trail. The valid Insights type in this release is ApiCallRateInsight.
The number of results returned.
*/ - InsightType?: InsightType | string; + ResultsCount?: number; + + /** + *The total number of results returned by a query.
+ */ + TotalResultsCount?: number; } -export namespace InsightSelector { +export namespace QueryStatistics { /** * @internal */ - export const filterSensitiveLog = (obj: InsightSelector): any => ({ + export const filterSensitiveLog = (obj: QueryStatistics): any => ({ ...obj, }); } -export interface GetInsightSelectorsResponse { +export interface GetQueryResultsResponse { /** - *The Amazon Resource Name (ARN) of a trail for which you want to get Insights selectors.
+ *The status of the query. Values include QUEUED, RUNNING, FINISHED, FAILED,
+ * or CANCELLED.
A JSON string that contains the insight types you want to log on a trail. In this release, only ApiCallRateInsight is supported as an insight type.
Shows the count of query results.
*/ - InsightSelectors?: InsightSelector[]; + QueryStatistics?: QueryStatistics; + + /** + *Contains the individual event results of the query.
+ */ + QueryResultRows?: { [key: string]: string }[][]; + + /** + *A token you can use to get the next page of query results.
+ */ + NextToken?: string; + + /** + *The error message returned if a query failed.
+ */ + ErrorMessage?: string; } -export namespace GetInsightSelectorsResponse { +export namespace GetQueryResultsResponse { /** * @internal */ - export const filterSensitiveLog = (obj: GetInsightSelectorsResponse): any => ({ + export const filterSensitiveLog = (obj: GetQueryResultsResponse): any => ({ ...obj, }); } /** - *If you run GetInsightSelectors on a trail that does not have Insights events enabled, the operation throws the exception InsightNotEnabledException.
This exception is thrown if the limit specified is not valid.
*/ -export interface InsightNotEnabledException extends __SmithyException, $MetadataBearer { - name: "InsightNotEnabledException"; +export interface InvalidMaxResultsException extends __SmithyException, $MetadataBearer { + name: "InvalidMaxResultsException"; $fault: "client"; /** *Brief description of the exception returned by the request.
@@ -1992,11 +2671,32 @@ export interface InsightNotEnabledException extends __SmithyException, $Metadata Message?: string; } -export namespace InsightNotEnabledException { +export namespace InvalidMaxResultsException { /** * @internal */ - export const filterSensitiveLog = (obj: InsightNotEnabledException): any => ({ + export const filterSensitiveLog = (obj: InvalidMaxResultsException): any => ({ + ...obj, + }); +} + +/** + *A token that is not valid, or a token that was previously used in a request with different parameters. This exception is thrown if the token is not valid.
+ */ +export interface InvalidNextTokenException extends __SmithyException, $MetadataBearer { + name: "InvalidNextTokenException"; + $fault: "client"; + /** + *Brief description of the exception returned by the request.
+ */ + Message?: string; +} + +export namespace InvalidNextTokenException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InvalidNextTokenException): any => ({ ...obj, }); } @@ -2173,6 +2873,115 @@ export namespace GetTrailStatusResponse { }); } +export interface ListEventDataStoresRequest { + /** + *A token you can use to get the next page of event data store results.
+ */ + NextToken?: string; + + /** + *The maximum number of event data stores to display on a single page.
+ */ + MaxResults?: number; +} + +export namespace ListEventDataStoresRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListEventDataStoresRequest): any => ({ + ...obj, + }); +} + +/** + *A storage lake of event data against which you can run complex SQL-based queries. An event data store can include events + * that you have logged on your account from the last 90 to 2555 days + * (about three months to up to seven years). To select events for an event data store, + * use advanced event selectors.
+ */ +export interface EventDataStore { + /** + *The ARN of the event data store.
+ */ + EventDataStoreArn?: string; + + /** + *The name of the event data store.
+ */ + Name?: string; + + /** + *Indicates whether the event data store is protected from termination.
+ */ + TerminationProtectionEnabled?: boolean; + + /** + *The status of an event data store. Values are ENABLED and PENDING_DELETION.
The advanced event selectors that were used to select events for the data store.
+ */ + AdvancedEventSelectors?: AdvancedEventSelector[]; + + /** + *Indicates whether the event data store includes events from all regions, or only from the region in which it was created.
+ */ + MultiRegionEnabled?: boolean; + + /** + *Indicates that an event data store is collecting logged events for an organization.
+ */ + OrganizationEnabled?: boolean; + + /** + *The retention period, in days.
+ */ + RetentionPeriod?: number; + + /** + *The timestamp of the event data store's creation.
+ */ + CreatedTimestamp?: Date; + + /** + *The timestamp showing when an event data store was updated, if applicable. UpdatedTimestamp is always either the same or newer than the time shown in CreatedTimestamp.
Contains information about event data stores in the account, in the current region.
+ */ + EventDataStores?: EventDataStore[]; + + /** + *A token you can use to get the next page of results.
+ */ + NextToken?: string; +} + +export namespace ListEventDataStoresResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListEventDataStoresResponse): any => ({ + ...obj, + }); +} + /** *Occurs if the timestamp values are not valid. Either the start time occurs after the end time, or the time range is outside the range of possible values.
*/ @@ -2256,53 +3065,192 @@ export interface PublicKey { Value?: Uint8Array; /** - *The starting time of validity of the public key.
+ *The starting time of validity of the public key.
+ */ + ValidityStartTime?: Date; + + /** + *The ending time of validity of the public key.
+ */ + ValidityEndTime?: Date; + + /** + *The fingerprint of the public key.
+ */ + Fingerprint?: string; +} + +export namespace PublicKey { + /** + * @internal + */ + export const filterSensitiveLog = (obj: PublicKey): any => ({ + ...obj, + }); +} + +/** + *Returns the objects or data listed below if successful. Otherwise, returns an error.
+ */ +export interface ListPublicKeysResponse { + /** + *Contains an array of PublicKey objects.
+ *The returned public keys may have validity time ranges that overlap.
+ *Reserved for future use.
+ */ + NextToken?: string; +} + +export namespace ListPublicKeysResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: ListPublicKeysResponse): any => ({ + ...obj, + }); +} + +/** + *A date range for the query was specified that is not valid. For more information + * about writing a query, see Create + * or edit a query in the CloudTrail User Guide.
+ */ +export interface InvalidDateRangeException extends __SmithyException, $MetadataBearer { + name: "InvalidDateRangeException"; + $fault: "client"; + /** + *Brief description of the exception returned by the request.
+ */ + Message?: string; +} + +export namespace InvalidDateRangeException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InvalidDateRangeException): any => ({ + ...obj, + }); +} + +/** + *The query status is not valid for the operation.
+ */ +export interface InvalidQueryStatusException extends __SmithyException, $MetadataBearer { + name: "InvalidQueryStatusException"; + $fault: "client"; + /** + *Brief description of the exception returned by the request.
+ */ + Message?: string; +} + +export namespace InvalidQueryStatusException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InvalidQueryStatusException): any => ({ + ...obj, + }); +} + +export interface ListQueriesRequest { + /** + *The ARN (or the ID suffix of the ARN) of an event data store on which queries were run.
+ */ + EventDataStore: string | undefined; + + /** + *A token you can use to get the next page of results.
+ */ + NextToken?: string; + + /** + *The maximum number of queries to show on a page.
+ */ + MaxResults?: number; + + /** + *Use with EndTime to bound a ListQueries request, and limit its results to only those queries run
+ * within a specified time period.
Use with StartTime to bound a ListQueries request, and limit its results to only those queries run
+ * within a specified time period.
The status of queries that you want to return in results. Valid values for QueryStatus include QUEUED, RUNNING,
+ * FINISHED, FAILED, or CANCELLED.
A SQL string of criteria about events that you want to collect in an event data store.
+ */ +export interface Query { + /** + *The ID of a query.
*/ - ValidityStartTime?: Date; + QueryId?: string; /** - *The ending time of validity of the public key.
+ *The status of the query. This can be QUEUED, RUNNING, FINISHED, FAILED,
+ * or CANCELLED.
The fingerprint of the public key.
+ *The creation time of a query.
*/ - Fingerprint?: string; + CreationTime?: Date; } -export namespace PublicKey { +export namespace Query { /** * @internal */ - export const filterSensitiveLog = (obj: PublicKey): any => ({ + export const filterSensitiveLog = (obj: Query): any => ({ ...obj, }); } -/** - *Returns the objects or data listed below if successful. Otherwise, returns an error.
- */ -export interface ListPublicKeysResponse { +export interface ListQueriesResponse { /** - *Contains an array of PublicKey objects.
- *The returned public keys may have validity time ranges that overlap.
- *Lists matching query results, and shows query ID, status, and creation time of each query.
*/ - PublicKeyList?: PublicKey[]; + Queries?: Query[]; /** - *Reserved for future use.
+ *A token you can use to get the next page of results.
*/ NextToken?: string; } -export namespace ListPublicKeysResponse { +export namespace ListQueriesResponse { /** * @internal */ - export const filterSensitiveLog = (obj: ListPublicKeysResponse): any => ({ + export const filterSensitiveLog = (obj: ListQueriesResponse): any => ({ ...obj, }); } @@ -2497,48 +3445,6 @@ export namespace InvalidLookupAttributesException { }); } -/** - *This exception is thrown if the limit specified is not valid.
- */ -export interface InvalidMaxResultsException extends __SmithyException, $MetadataBearer { - name: "InvalidMaxResultsException"; - $fault: "client"; - /** - *Brief description of the exception returned by the request.
- */ - Message?: string; -} - -export namespace InvalidMaxResultsException { - /** - * @internal - */ - export const filterSensitiveLog = (obj: InvalidMaxResultsException): any => ({ - ...obj, - }); -} - -/** - *A token that is not valid, or a token that was previously used in a request with different parameters. This exception is thrown if the token is not valid.
- */ -export interface InvalidNextTokenException extends __SmithyException, $MetadataBearer { - name: "InvalidNextTokenException"; - $fault: "client"; - /** - *Brief description of the exception returned by the request.
- */ - Message?: string; -} - -export namespace InvalidNextTokenException { - /** - * @internal - */ - export const filterSensitiveLog = (obj: InvalidNextTokenException): any => ({ - ...obj, - }); -} - export enum EventCategory { Insight = "insight", } @@ -2898,7 +3804,7 @@ export interface PutInsightSelectorsRequest { TrailName: string | undefined; /** - *A JSON string that contains the Insights types that you want to log on a trail. The valid Insights type in this release is ApiCallRateInsight.
A JSON string that contains the insight types you want to log on a trail. ApiCallRateInsight and ApiErrorRateInsight are valid insight types.
A JSON string that contains the Insights event types that you want to log on a trail. The valid Insights type in this release is ApiCallRateInsight.
A JSON string that contains the Insights event types that you want to log on a trail. The valid Insights types in this release are
+ * ApiErrorRateInsight and ApiCallRateInsight.
Specifies a list of tags to be removed.
*/ - TagsList?: Tag[]; + TagsList: Tag[] | undefined; } export namespace RemoveTagsRequest { @@ -2974,6 +3881,106 @@ export namespace RemoveTagsResponse { }); } +/** + *The event data store is not in a status that supports the operation.
+ */ +export interface InvalidEventDataStoreStatusException extends __SmithyException, $MetadataBearer { + name: "InvalidEventDataStoreStatusException"; + $fault: "client"; + /** + *Brief description of the exception returned by the request.
+ */ + Message?: string; +} + +export namespace InvalidEventDataStoreStatusException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InvalidEventDataStoreStatusException): any => ({ + ...obj, + }); +} + +export interface RestoreEventDataStoreRequest { + /** + *The ARN (or the ID suffix of the ARN) of the event data store that you want to restore.
+ */ + EventDataStore: string | undefined; +} + +export namespace RestoreEventDataStoreRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: RestoreEventDataStoreRequest): any => ({ + ...obj, + }); +} + +export interface RestoreEventDataStoreResponse { + /** + *The event data store ARN.
+ */ + EventDataStoreArn?: string; + + /** + *The name of the event data store.
+ */ + Name?: string; + + /** + *The status of the event data store.
+ */ + Status?: EventDataStoreStatus | string; + + /** + *The advanced event selectors that were used to select events.
+ */ + AdvancedEventSelectors?: AdvancedEventSelector[]; + + /** + *Indicates whether the event data store is collecting events from all regions, or only from the region in which the event data + * store was created.
+ */ + MultiRegionEnabled?: boolean; + + /** + *Indicates whether an event data store is collecting logged events for an organization in Organizations.
+ */ + OrganizationEnabled?: boolean; + + /** + *The retention period, in days.
+ */ + RetentionPeriod?: number; + + /** + *Indicates that termination protection is enabled and the event data store cannot be automatically deleted.
+ */ + TerminationProtectionEnabled?: boolean; + + /** + *The timestamp of an event data store's creation.
+ */ + CreatedTimestamp?: Date; + + /** + *The timestamp that shows when an event data store was updated, if applicable.
+ * UpdatedTimestamp is always either the same or newer than the time shown in CreatedTimestamp.
The request to CloudTrail to start logging Amazon Web Services API calls for an account.
*/ @@ -3011,6 +4018,83 @@ export namespace StartLoggingResponse { }); } +/** + *The query that was submitted has validation errors, or uses incorrect syntax or unsupported keywords. For more information + * about writing a query, see Create + * or edit a query in the CloudTrail User Guide.
+ */ +export interface InvalidQueryStatementException extends __SmithyException, $MetadataBearer { + name: "InvalidQueryStatementException"; + $fault: "client"; + /** + *Brief description of the exception returned by the request.
+ */ + Message?: string; +} + +export namespace InvalidQueryStatementException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: InvalidQueryStatementException): any => ({ + ...obj, + }); +} + +/** + *You are already running the maximum number of concurrent queries. Wait a minute for some queries to finish, and then + * run the query again.
+ */ +export interface MaxConcurrentQueriesException extends __SmithyException, $MetadataBearer { + name: "MaxConcurrentQueriesException"; + $fault: "client"; + /** + *Brief description of the exception returned by the request.
+ */ + Message?: string; +} + +export namespace MaxConcurrentQueriesException { + /** + * @internal + */ + export const filterSensitiveLog = (obj: MaxConcurrentQueriesException): any => ({ + ...obj, + }); +} + +export interface StartQueryRequest { + /** + *The SQL code of your query.
+ */ + QueryStatement: string | undefined; +} + +export namespace StartQueryRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartQueryRequest): any => ({ + ...obj, + }); +} + +export interface StartQueryResponse { + /** + *The ID of the started query.
+ */ + QueryId?: string; +} + +export namespace StartQueryResponse { + /** + * @internal + */ + export const filterSensitiveLog = (obj: StartQueryResponse): any => ({ + ...obj, + }); +} + /** *Passes the request to CloudTrail to stop logging Amazon Web Services API calls for the specified account.
*/ @@ -3048,6 +4132,113 @@ export namespace StopLoggingResponse { }); } +export interface UpdateEventDataStoreRequest { + /** + *The ARN (or the ID suffix of the ARN) of the event data store that you want to update.
+ */ + EventDataStore: string | undefined; + + /** + *The event data store name.
+ */ + Name?: string; + + /** + *The advanced event selectors used to select events for the event data store.
+ */ + AdvancedEventSelectors?: AdvancedEventSelector[]; + + /** + *Specifies whether an event data store collects events from all regions, or only from the region in which it was created.
+ */ + MultiRegionEnabled?: boolean; + + /** + *Specifies whether an event data store collects events logged for an organization in Organizations.
+ */ + OrganizationEnabled?: boolean; + + /** + *The retention period, in days.
+ */ + RetentionPeriod?: number; + + /** + *Indicates that termination protection is enabled and the event data store cannot be automatically deleted.
+ */ + TerminationProtectionEnabled?: boolean; +} + +export namespace UpdateEventDataStoreRequest { + /** + * @internal + */ + export const filterSensitiveLog = (obj: UpdateEventDataStoreRequest): any => ({ + ...obj, + }); +} + +export interface UpdateEventDataStoreResponse { + /** + *The ARN of the event data store.
+ */ + EventDataStoreArn?: string; + + /** + *The name of the event data store.
+ */ + Name?: string; + + /** + *The status of an event data store. Values can be ENABLED and PENDING_DELETION.
The advanced event selectors that are applied to the event data store.
+ */ + AdvancedEventSelectors?: AdvancedEventSelector[]; + + /** + *Indicates whether the event data store includes events from all regions, or only from the region in which it was created.
+ */ + MultiRegionEnabled?: boolean; + + /** + *Indicates whether an event data store is collecting logged events for an organization in Organizations.
+ */ + OrganizationEnabled?: boolean; + + /** + *The retention period, in days.
+ */ + RetentionPeriod?: number; + + /** + *Indicates whether termination protection is enabled for the event data store.
+ */ + TerminationProtectionEnabled?: boolean; + + /** + *The timestamp that shows when an event data store was first created.
+ */ + CreatedTimestamp?: Date; + + /** + *The timestamp that shows when the event data store was last updated. UpdatedTimestamp is always either the same or newer than the time shown in CreatedTimestamp.
Specifies settings to update for the trail.
*/ diff --git a/clients/client-cloudtrail/src/pagination/GetQueryResultsPaginator.ts b/clients/client-cloudtrail/src/pagination/GetQueryResultsPaginator.ts new file mode 100644 index 000000000000..75c844e2901a --- /dev/null +++ b/clients/client-cloudtrail/src/pagination/GetQueryResultsPaginator.ts @@ -0,0 +1,58 @@ +import { Paginator } from "@aws-sdk/types"; + +import { CloudTrail } from "../CloudTrail"; +import { CloudTrailClient } from "../CloudTrailClient"; +import { + GetQueryResultsCommand, + GetQueryResultsCommandInput, + GetQueryResultsCommandOutput, +} from "../commands/GetQueryResultsCommand"; +import { CloudTrailPaginationConfiguration } from "./Interfaces"; + +/** + * @private + */ +const makePagedClientRequest = async ( + client: CloudTrailClient, + input: GetQueryResultsCommandInput, + ...args: any +): PromiseDetective uses machine learning and purpose-built visualizations to help you analyze and -investigate security issues across your Amazon Web Services (AWS) workloads. Detective automatically -extracts time-based events such as login attempts, API calls, and network traffic from -AWS CloudTrail and Amazon Virtual Private Cloud (Amazon VPC) flow logs. It also extracts findings detected by +
Detective uses machine learning and purpose-built visualizations to help you to +analyze and investigate security issues across your Amazon Web Services (Amazon Web Services) workloads. Detective automatically extracts time-based events such +as login attempts, API calls, and network traffic from CloudTrail and Amazon Virtual Private Cloud (Amazon VPC) flow logs. It also extracts findings detected by Amazon GuardDuty.
-The Detective API primarily supports the creation and management of behavior graphs. A -behavior graph contains the extracted data from a set of member accounts, and is created -and managed by an administrator account.
-Every behavior graph is specific to a Region. You can only use the API to manage graphs -that belong to the Region that is associated with the currently selected endpoint.
-A Detective administrator account can use the Detective API to do the following:
+The Detective API primarily supports the creation and management of behavior +graphs. A behavior graph contains the extracted data from a set of member accounts, and is +created and managed by an administrator account.
+To add a member account to the behavior graph, the administrator account sends an +invitation to the account. When the account accepts the invitation, it becomes a member +account in the behavior graph.
+Detective is also integrated with Organizations. The organization +management account designates the Detective administrator account for the +organization. That account becomes the administrator account for the organization behavior +graph. The Detective administrator account can enable any organization account as +a member account in the organization behavior graph. The organization accounts do not +receive invitations. The Detective administrator account can also invite other +accounts to the organization behavior graph.
+Every behavior graph is specific to a Region. You can only use the API to manage +behavior graphs that belong to the Region that is associated with the currently selected +endpoint.
+The administrator account for a behavior graph can use the Detective API to do +the following: