Skip to content

Commit

Permalink
feat(client-application-discovery-service): Add sensitive protection …
Browse files Browse the repository at this point in the history
…for customer information
  • Loading branch information
awstools committed Sep 18, 2023
1 parent 1e90e46 commit b4f1bba
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ import {
ServiceInputTypes,
ServiceOutputTypes,
} from "../ApplicationDiscoveryServiceClient";
import { DescribeAgentsRequest, DescribeAgentsResponse } from "../models/models_0";
import {
DescribeAgentsRequest,
DescribeAgentsResponse,
DescribeAgentsResponseFilterSensitiveLog,
} from "../models/models_0";
import { de_DescribeAgentsCommand, se_DescribeAgentsCommand } from "../protocols/Aws_json1_1";

/**
Expand Down Expand Up @@ -168,7 +172,7 @@ export class DescribeAgentsCommand extends $Command<
clientName,
commandName,
inputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: (_: any) => _,
outputFilterSensitiveLog: DescribeAgentsResponseFilterSensitiveLog,
};
const { requestHandler } = configuration;
return stack.resolve(
Expand Down
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 { ApplicationDiscoveryServiceServiceException as __BaseException } from "./ApplicationDiscoveryServiceServiceException";

Expand Down Expand Up @@ -2428,3 +2428,26 @@ export interface UpdateApplicationRequest {
* @public
*/
export interface UpdateApplicationResponse {}

/**
* @internal
*/
export const AgentNetworkInfoFilterSensitiveLog = (obj: AgentNetworkInfo): any => ({
...obj,
});

/**
* @internal
*/
export const AgentInfoFilterSensitiveLog = (obj: AgentInfo): any => ({
...obj,
...(obj.agentNetworkInfoList && { agentNetworkInfoList: SENSITIVE_STRING }),
});

/**
* @internal
*/
export const DescribeAgentsResponseFilterSensitiveLog = (obj: DescribeAgentsResponse): any => ({
...obj,
...(obj.agentsInfo && { agentsInfo: obj.agentsInfo.map((item) => AgentInfoFilterSensitiveLog(item)) }),
});
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,8 @@
}
},
"traits": {
"smithy.api#documentation": "<p>Network details about the host where the agent/collector resides.</p>"
"smithy.api#documentation": "<p>Network details about the host where the agent/collector resides.</p>",
"smithy.api#sensitive": {}
}
},
"com.amazonaws.applicationdiscoveryservice#AgentNetworkInfoList": {
Expand Down Expand Up @@ -4515,8 +4516,8 @@
"type": "double",
"traits": {
"smithy.api#range": {
"min": 0,
"max": 100
"min": 0.0,
"max": 100.0
}
}
},
Expand Down Expand Up @@ -4548,4 +4549,4 @@
}
}
}
}
}

0 comments on commit b4f1bba

Please sign in to comment.