Skip to content

Commit

Permalink
feat(client-cloudtrail): Increases the retention period maximum to 25…
Browse files Browse the repository at this point in the history
…57 days. Deprecates unused fields of the ListEventDataStores API response. Updates documentation.
  • Loading branch information
awstools committed Apr 27, 2022
1 parent 12fb21d commit 13baee3
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 66 deletions.
17 changes: 11 additions & 6 deletions clients/client-cloudtrail/src/CloudTrail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,15 @@ import { UpdateTrailCommand, UpdateTrailCommandInput, UpdateTrailCommandOutput }
*/
export class CloudTrail extends CloudTrailClient {
/**
* <p>Adds one or more tags to a trail, up to a limit of 50. Overwrites an existing tag's value when a new value is specified for an existing tag key.
* Tag key names must be unique for a trail; you cannot have two keys with the same name but different values.
* If you specify a key without a value, the tag will be created with the specified key and a value of null.
* You can tag a trail that applies to all Amazon Web Services Regions only from the Region in which the trail was created (also known as its home region).</p>
* <p>Adds one or more tags to a trail or event data store, up to a limit of 50. Overwrites an
* existing tag's value when a new value is specified for an existing tag key.
* Tag key names must be unique for a trail; you cannot have two keys with the same name but
* different values.
* If you specify a key without a value, the tag will be created with the specified key and a
* value of null.
* You can tag a trail or event data store that applies to all Amazon Web Services Regions
* only from the Region in which the trail or event data store was created (also known as its
* home region).</p>
*/
public addTags(args: AddTagsCommandInput, options?: __HttpHandlerOptions): Promise<AddTagsCommandOutput>;
public addTags(args: AddTagsCommandInput, cb: (err: any, data?: AddTagsCommandOutput) => void): void;
Expand Down Expand Up @@ -674,7 +679,7 @@ export class CloudTrail extends CloudTrailClient {
}

/**
* <p>Lists the tags for the trail in the current region.</p>
* <p>Lists the tags for the trail or event data store in the current region.</p>
*/
public listTags(args: ListTagsCommandInput, options?: __HttpHandlerOptions): Promise<ListTagsCommandOutput>;
public listTags(args: ListTagsCommandInput, cb: (err: any, data?: ListTagsCommandOutput) => void): void;
Expand Down Expand Up @@ -913,7 +918,7 @@ export class CloudTrail extends CloudTrailClient {
}

/**
* <p>Removes the specified tags from a trail.</p>
* <p>Removes the specified tags from a trail or event data store.</p>
*/
public removeTags(args: RemoveTagsCommandInput, options?: __HttpHandlerOptions): Promise<RemoveTagsCommandOutput>;
public removeTags(args: RemoveTagsCommandInput, cb: (err: any, data?: RemoveTagsCommandOutput) => void): void;
Expand Down
13 changes: 9 additions & 4 deletions clients/client-cloudtrail/src/commands/AddTagsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ export interface AddTagsCommandInput extends AddTagsRequest {}
export interface AddTagsCommandOutput extends AddTagsResponse, __MetadataBearer {}

/**
* <p>Adds one or more tags to a trail, up to a limit of 50. Overwrites an existing tag's value when a new value is specified for an existing tag key.
* Tag key names must be unique for a trail; you cannot have two keys with the same name but different values.
* If you specify a key without a value, the tag will be created with the specified key and a value of null.
* You can tag a trail that applies to all Amazon Web Services Regions only from the Region in which the trail was created (also known as its home region).</p>
* <p>Adds one or more tags to a trail or event data store, up to a limit of 50. Overwrites an
* existing tag's value when a new value is specified for an existing tag key.
* Tag key names must be unique for a trail; you cannot have two keys with the same name but
* different values.
* If you specify a key without a value, the tag will be created with the specified key and a
* value of null.
* You can tag a trail or event data store that applies to all Amazon Web Services Regions
* only from the Region in which the trail or event data store was created (also known as its
* home region).</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
2 changes: 1 addition & 1 deletion clients/client-cloudtrail/src/commands/ListTagsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface ListTagsCommandInput extends ListTagsRequest {}
export interface ListTagsCommandOutput extends ListTagsResponse, __MetadataBearer {}

/**
* <p>Lists the tags for the trail in the current region.</p>
* <p>Lists the tags for the trail or event data store in the current region.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export interface RemoveTagsCommandInput extends RemoveTagsRequest {}
export interface RemoveTagsCommandOutput extends RemoveTagsResponse, __MetadataBearer {}

/**
* <p>Removes the specified tags from a trail.</p>
* <p>Removes the specified tags from a trail or event data store.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
77 changes: 47 additions & 30 deletions clients/client-cloudtrail/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ export namespace Tag {
}

/**
* <p>Specifies the tags to add to a trail.</p>
* <p>Specifies the tags to add to a trail or event data store.</p>
*/
export interface AddTagsRequest {
/**
* <p>Specifies the ARN of the trail to which one or more tags will be added. The format of a trail ARN is:</p>
* <p>Specifies the ARN of the trail or event data store to which one or more tags will be added. The format of a trail ARN is:</p>
* <p>
* <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
* </p>
Expand Down Expand Up @@ -98,7 +98,7 @@ export class CloudTrailARNInvalidException extends __BaseException {

/**
* <p>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.
* This can occur when you try to run an operation on a resource before CloudTrail has time to fully load the resource.
* If this exception occurs, wait a few minutes, and then try the operation again.</p>
*/
export class ConflictException extends __BaseException {
Expand Down Expand Up @@ -147,7 +147,7 @@ export class EventDataStoreNotFoundException extends __BaseException {
}

/**
* <p>The event data store against which you ran your query is inactive.</p>
* <p>The event data store is inactive.</p>
*/
export class InactiveEventDataStoreException extends __BaseException {
readonly name: "InactiveEventDataStoreException" = "InactiveEventDataStoreException";
Expand Down Expand Up @@ -238,9 +238,10 @@ export class InvalidTrailNameException extends __BaseException {
}

/**
* <p>This exception is thrown when the Amazon Web Services account making the request to create or update an organization trail is not the management account for an
* <p>This exception is thrown when the Amazon Web Services account making the request to create
* or update an organization trail or event data store is not the management account for an
* organization in Organizations. For more information, see
* <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare For Creating a Trail For Your Organization</a>.</p>
* <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare For Creating a Trail For Your Organization</a> or <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-event-data-store.html">Create an event data store</a>.</p>
*/
export class NotOrganizationMasterAccountException extends __BaseException {
readonly name: "NotOrganizationMasterAccountException" = "NotOrganizationMasterAccountException";
Expand Down Expand Up @@ -1072,9 +1073,9 @@ export class EventDataStoreMaxLimitExceededException extends __BaseException {
}

/**
* <p>This exception is thrown when the IAM user or role that is used to create the organization trail is lacking one or more required permissions for
* creating an organization trail in a required service. For more information, see
* <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare For Creating a Trail For Your Organization</a>.</p>
* <p>This exception is thrown when the IAM user or role that is used to create
* the organization resource lacks one or more required permissions for
* creating an organization resource in a required service.</p>
*/
export class InsufficientDependencyServiceAccessPermissionException extends __BaseException {
readonly name: "InsufficientDependencyServiceAccessPermissionException" =
Expand All @@ -1099,9 +1100,9 @@ export class InsufficientDependencyServiceAccessPermissionException extends __Ba
}

/**
* <p>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
* <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/creating-an-organizational-trail-prepare.html">Prepare For Creating a Trail For Your Organization</a>.</p>
* <p>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 or event data store.</p>
*/
export class OrganizationNotInAllFeaturesModeException extends __BaseException {
readonly name: "OrganizationNotInAllFeaturesModeException" = "OrganizationNotInAllFeaturesModeException";
Expand Down Expand Up @@ -3091,42 +3092,58 @@ export interface EventDataStore {
Name?: string;

/**
* <p>Indicates whether the event data store is protected from termination.</p>
* @deprecated
*
* <p>This field is being deprecated. Indicates whether the event data store is protected from termination.</p>
*/
TerminationProtectionEnabled?: boolean;

/**
* <p>The status of an event data store. Values are <code>ENABLED</code> and <code>PENDING_DELETION</code>.</p>
* @deprecated
*
* <p>This field is being deprecated. The status of an event data store. Values are <code>ENABLED</code> and <code>PENDING_DELETION</code>.</p>
*/
Status?: EventDataStoreStatus | string;

/**
* <p>The advanced event selectors that were used to select events for the data store.</p>
* @deprecated
*
* <p>This field is being deprecated. The advanced event selectors that were used to select events for the data store.</p>
*/
AdvancedEventSelectors?: AdvancedEventSelector[];

/**
* <p>Indicates whether the event data store includes events from all regions, or only from the region in which it was created.</p>
* @deprecated
*
* <p>This field is being deprecated. Indicates whether the event data store includes events from all regions, or only from the region in which it was created.</p>
*/
MultiRegionEnabled?: boolean;

/**
* <p>Indicates that an event data store is collecting logged events for an organization.</p>
* @deprecated
*
* <p>This field is being deprecated. Indicates that an event data store is collecting logged events for an organization.</p>
*/
OrganizationEnabled?: boolean;

/**
* <p>The retention period, in days.</p>
* @deprecated
*
* <p>This field is being deprecated. The retention period, in days.</p>
*/
RetentionPeriod?: number;

/**
* <p>The timestamp of the event data store's creation.</p>
* @deprecated
*
* <p>This field is being deprecated. The timestamp of the event data store's creation.</p>
*/
CreatedTimestamp?: Date;

/**
* <p>The timestamp showing when an event data store was updated, if applicable. <code>UpdatedTimestamp</code> is always either the same or newer than the time shown in <code>CreatedTimestamp</code>.</p>
* @deprecated
*
* <p>This field is being deprecated. The timestamp showing when an event data store was updated, if applicable. <code>UpdatedTimestamp</code> is always either the same or newer than the time shown in <code>CreatedTimestamp</code>.</p>
*/
UpdatedTimestamp?: Date;
}
Expand Down Expand Up @@ -3302,7 +3319,8 @@ export namespace ListPublicKeysResponse {
}

/**
* <p>A date range for the query was specified that is not valid. For more information
* <p>A date range for the query was specified that is not valid. Be sure that the start time is chronologically
* before the end time. For more information
* about writing a query, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/query-create-edit-query.html">Create
* or edit a query</a> in the <i>CloudTrail User Guide</i>.</p>
*/
Expand Down Expand Up @@ -3447,15 +3465,12 @@ export namespace ListQueriesResponse {
}

/**
* <p>Specifies a list of trail tags to return.</p>
* <p>Specifies a list of tags to return.</p>
*/
export interface ListTagsRequest {
/**
* <p>Specifies a list of trail ARNs whose tags will be listed. The list has a limit of 20 ARNs. The following is the format of
* a trail ARN.</p>
* <p>
* <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
* </p>
* <p>Specifies a list of trail and event data store ARNs whose tags will be listed. The list
* has a limit of 20 ARNs.</p>
*/
ResourceIdList: string[] | undefined;

Expand Down Expand Up @@ -4044,13 +4059,15 @@ export namespace PutInsightSelectorsResponse {
}

/**
* <p>Specifies the tags to remove from a trail.</p>
* <p>Specifies the tags to remove from a trail or event data store.</p>
*/
export interface RemoveTagsRequest {
/**
* <p>Specifies the ARN of the trail from which tags should be removed. The format of a trail ARN is:</p>
* <p>Specifies the ARN of the trail or event data store from which tags should be removed.</p>
* <p>
* <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
* Example trail ARN format: <code>arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail</code>
* </p>
* <p>Example event data store ARN format: <code>arn:aws:cloudtrail:us-east-2:12345678910:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE</code>
* </p>
*/
ResourceId: string | undefined;
Expand Down
Loading

0 comments on commit 13baee3

Please sign in to comment.