Skip to content

Commit

Permalink
feat(client-cloudwatch-events): Adds sensitive trait to various shape…
Browse files Browse the repository at this point in the history
…s in Jetstream Connections API model.
  • Loading branch information
awstools committed Sep 22, 2023
1 parent 8fc8760 commit 4fa6b7a
Show file tree
Hide file tree
Showing 5 changed files with 293 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ import {
} from "@smithy/types";

import { CloudWatchEventsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchEventsClient";
import { CreateConnectionRequest, CreateConnectionResponse } from "../models/models_0";
import {
CreateConnectionRequest,
CreateConnectionRequestFilterSensitiveLog,
CreateConnectionResponse,
} from "../models/models_0";
import { de_CreateConnectionCommand, se_CreateConnectionCommand } from "../protocols/Aws_json1_1";

/**
Expand Down Expand Up @@ -193,7 +197,7 @@ export class CreateConnectionCommand extends $Command<
logger,
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
inputFilterSensitiveLog: CreateConnectionRequestFilterSensitiveLog,
outputFilterSensitiveLog: (_: any) => _,
[SMITHY_CONTEXT_KEY]: {
service: "AWSEvents",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ import {
} from "@smithy/types";

import { CloudWatchEventsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchEventsClient";
import { DescribeConnectionRequest, DescribeConnectionResponse } from "../models/models_0";
import {
DescribeConnectionRequest,
DescribeConnectionResponse,
DescribeConnectionResponseFilterSensitiveLog,
} from "../models/models_0";
import { de_DescribeConnectionCommand, se_DescribeConnectionCommand } from "../protocols/Aws_json1_1";

/**
Expand Down Expand Up @@ -190,7 +194,7 @@ export class DescribeConnectionCommand extends $Command<
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: DescribeConnectionResponseFilterSensitiveLog,
[SMITHY_CONTEXT_KEY]: {
service: "AWSEvents",
operation: "DescribeConnection",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ import {
} from "@smithy/types";

import { CloudWatchEventsClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchEventsClient";
import { UpdateConnectionRequest, UpdateConnectionResponse } from "../models/models_0";
import {
UpdateConnectionRequest,
UpdateConnectionRequestFilterSensitiveLog,
UpdateConnectionResponse,
} from "../models/models_0";
import { de_UpdateConnectionCommand, se_UpdateConnectionCommand } from "../protocols/Aws_json1_1";

/**
Expand Down Expand Up @@ -196,7 +200,7 @@ export class UpdateConnectionCommand extends $Command<
logger,
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
inputFilterSensitiveLog: UpdateConnectionRequestFilterSensitiveLog,
outputFilterSensitiveLog: (_: any) => _,
[SMITHY_CONTEXT_KEY]: {
service: "AWSEvents",
Expand Down
227 changes: 226 additions & 1 deletion clients/client-cloudwatch-events/src/models/models_0.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// smithy-typescript generated code
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
import { ExceptionOptionType as __ExceptionOptionType, SENSITIVE_STRING } from "@smithy/smithy-client";

import { CloudWatchEventsServiceException as __BaseException } from "./CloudWatchEventsServiceException";

Expand Down Expand Up @@ -4652,3 +4652,228 @@ export interface UpdateConnectionResponse {
*/
LastAuthorizedTime?: Date;
}

/**
* @internal
*/
export const CreateConnectionApiKeyAuthRequestParametersFilterSensitiveLog = (
obj: CreateConnectionApiKeyAuthRequestParameters
): any => ({
...obj,
...(obj.ApiKeyValue && { ApiKeyValue: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const CreateConnectionBasicAuthRequestParametersFilterSensitiveLog = (
obj: CreateConnectionBasicAuthRequestParameters
): any => ({
...obj,
...(obj.Password && { Password: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const ConnectionBodyParameterFilterSensitiveLog = (obj: ConnectionBodyParameter): any => ({
...obj,
...(obj.Value && { Value: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const ConnectionHeaderParameterFilterSensitiveLog = (obj: ConnectionHeaderParameter): any => ({
...obj,
...(obj.Value && { Value: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const ConnectionQueryStringParameterFilterSensitiveLog = (obj: ConnectionQueryStringParameter): any => ({
...obj,
...(obj.Value && { Value: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const ConnectionHttpParametersFilterSensitiveLog = (obj: ConnectionHttpParameters): any => ({
...obj,
...(obj.HeaderParameters && {
HeaderParameters: obj.HeaderParameters.map((item) => ConnectionHeaderParameterFilterSensitiveLog(item)),
}),
...(obj.QueryStringParameters && {
QueryStringParameters: obj.QueryStringParameters.map((item) =>
ConnectionQueryStringParameterFilterSensitiveLog(item)
),
}),
...(obj.BodyParameters && {
BodyParameters: obj.BodyParameters.map((item) => ConnectionBodyParameterFilterSensitiveLog(item)),
}),
});

/**
* @internal
*/
export const CreateConnectionOAuthClientRequestParametersFilterSensitiveLog = (
obj: CreateConnectionOAuthClientRequestParameters
): any => ({
...obj,
...(obj.ClientSecret && { ClientSecret: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const CreateConnectionOAuthRequestParametersFilterSensitiveLog = (
obj: CreateConnectionOAuthRequestParameters
): any => ({
...obj,
...(obj.ClientParameters && {
ClientParameters: CreateConnectionOAuthClientRequestParametersFilterSensitiveLog(obj.ClientParameters),
}),
...(obj.OAuthHttpParameters && {
OAuthHttpParameters: ConnectionHttpParametersFilterSensitiveLog(obj.OAuthHttpParameters),
}),
});

/**
* @internal
*/
export const CreateConnectionAuthRequestParametersFilterSensitiveLog = (
obj: CreateConnectionAuthRequestParameters
): any => ({
...obj,
...(obj.BasicAuthParameters && {
BasicAuthParameters: CreateConnectionBasicAuthRequestParametersFilterSensitiveLog(obj.BasicAuthParameters),
}),
...(obj.OAuthParameters && {
OAuthParameters: CreateConnectionOAuthRequestParametersFilterSensitiveLog(obj.OAuthParameters),
}),
...(obj.ApiKeyAuthParameters && {
ApiKeyAuthParameters: CreateConnectionApiKeyAuthRequestParametersFilterSensitiveLog(obj.ApiKeyAuthParameters),
}),
...(obj.InvocationHttpParameters && {
InvocationHttpParameters: ConnectionHttpParametersFilterSensitiveLog(obj.InvocationHttpParameters),
}),
});

/**
* @internal
*/
export const CreateConnectionRequestFilterSensitiveLog = (obj: CreateConnectionRequest): any => ({
...obj,
...(obj.AuthParameters && {
AuthParameters: CreateConnectionAuthRequestParametersFilterSensitiveLog(obj.AuthParameters),
}),
});

/**
* @internal
*/
export const ConnectionOAuthResponseParametersFilterSensitiveLog = (obj: ConnectionOAuthResponseParameters): any => ({
...obj,
...(obj.OAuthHttpParameters && {
OAuthHttpParameters: ConnectionHttpParametersFilterSensitiveLog(obj.OAuthHttpParameters),
}),
});

/**
* @internal
*/
export const ConnectionAuthResponseParametersFilterSensitiveLog = (obj: ConnectionAuthResponseParameters): any => ({
...obj,
...(obj.OAuthParameters && {
OAuthParameters: ConnectionOAuthResponseParametersFilterSensitiveLog(obj.OAuthParameters),
}),
...(obj.InvocationHttpParameters && {
InvocationHttpParameters: ConnectionHttpParametersFilterSensitiveLog(obj.InvocationHttpParameters),
}),
});

/**
* @internal
*/
export const DescribeConnectionResponseFilterSensitiveLog = (obj: DescribeConnectionResponse): any => ({
...obj,
...(obj.AuthParameters && { AuthParameters: ConnectionAuthResponseParametersFilterSensitiveLog(obj.AuthParameters) }),
});

/**
* @internal
*/
export const UpdateConnectionApiKeyAuthRequestParametersFilterSensitiveLog = (
obj: UpdateConnectionApiKeyAuthRequestParameters
): any => ({
...obj,
...(obj.ApiKeyValue && { ApiKeyValue: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const UpdateConnectionBasicAuthRequestParametersFilterSensitiveLog = (
obj: UpdateConnectionBasicAuthRequestParameters
): any => ({
...obj,
...(obj.Password && { Password: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const UpdateConnectionOAuthClientRequestParametersFilterSensitiveLog = (
obj: UpdateConnectionOAuthClientRequestParameters
): any => ({
...obj,
...(obj.ClientSecret && { ClientSecret: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const UpdateConnectionOAuthRequestParametersFilterSensitiveLog = (
obj: UpdateConnectionOAuthRequestParameters
): any => ({
...obj,
...(obj.ClientParameters && {
ClientParameters: UpdateConnectionOAuthClientRequestParametersFilterSensitiveLog(obj.ClientParameters),
}),
...(obj.OAuthHttpParameters && {
OAuthHttpParameters: ConnectionHttpParametersFilterSensitiveLog(obj.OAuthHttpParameters),
}),
});

/**
* @internal
*/
export const UpdateConnectionAuthRequestParametersFilterSensitiveLog = (
obj: UpdateConnectionAuthRequestParameters
): any => ({
...obj,
...(obj.BasicAuthParameters && {
BasicAuthParameters: UpdateConnectionBasicAuthRequestParametersFilterSensitiveLog(obj.BasicAuthParameters),
}),
...(obj.OAuthParameters && {
OAuthParameters: UpdateConnectionOAuthRequestParametersFilterSensitiveLog(obj.OAuthParameters),
}),
...(obj.ApiKeyAuthParameters && {
ApiKeyAuthParameters: UpdateConnectionApiKeyAuthRequestParametersFilterSensitiveLog(obj.ApiKeyAuthParameters),
}),
...(obj.InvocationHttpParameters && {
InvocationHttpParameters: ConnectionHttpParametersFilterSensitiveLog(obj.InvocationHttpParameters),
}),
});

/**
* @internal
*/
export const UpdateConnectionRequestFilterSensitiveLog = (obj: UpdateConnectionRequest): any => ({
...obj,
...(obj.AuthParameters && {
AuthParameters: UpdateConnectionAuthRequestParametersFilterSensitiveLog(obj.AuthParameters),
}),
});
Loading

0 comments on commit 4fa6b7a

Please sign in to comment.