-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-config-service): This release adds ListConformancePackCom…
…plianceScores API to support the new compliance score feature, which provides a percentage of the number of compliant rule-resource combinations in a conformance pack compared to the number of total possible rule-resource combinations in the conformance pack.
- Loading branch information
awstools
committed
Jul 27, 2022
1 parent
2a18f3a
commit 6945e9e
Showing
14 changed files
with
795 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
112 changes: 112 additions & 0 deletions
112
clients/client-config-service/src/commands/ListConformancePackComplianceScoresCommand.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
// smithy-typescript generated code | ||
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 { ConfigServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConfigServiceClient"; | ||
import { | ||
ListConformancePackComplianceScoresRequest, | ||
ListConformancePackComplianceScoresRequestFilterSensitiveLog, | ||
ListConformancePackComplianceScoresResponse, | ||
ListConformancePackComplianceScoresResponseFilterSensitiveLog, | ||
} from "../models/models_0"; | ||
import { | ||
deserializeAws_json1_1ListConformancePackComplianceScoresCommand, | ||
serializeAws_json1_1ListConformancePackComplianceScoresCommand, | ||
} from "../protocols/Aws_json1_1"; | ||
|
||
export interface ListConformancePackComplianceScoresCommandInput extends ListConformancePackComplianceScoresRequest {} | ||
export interface ListConformancePackComplianceScoresCommandOutput | ||
extends ListConformancePackComplianceScoresResponse, | ||
__MetadataBearer {} | ||
|
||
/** | ||
* <p>Returns a list of conformance pack compliance scores. | ||
* A compliance score is the percentage of the number of compliant rule-resource combinations in a conformance pack compared to the number of total possible rule-resource combinations in the conformance pack. | ||
* This metric provides you with a high-level view of the compliance state of your conformance packs, and can be used to identify, investigate, and understand | ||
* compliance deviations in your conformance packs.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { ConfigServiceClient, ListConformancePackComplianceScoresCommand } from "@aws-sdk/client-config-service"; // ES Modules import | ||
* // const { ConfigServiceClient, ListConformancePackComplianceScoresCommand } = require("@aws-sdk/client-config-service"); // CommonJS import | ||
* const client = new ConfigServiceClient(config); | ||
* const command = new ListConformancePackComplianceScoresCommand(input); | ||
* const response = await client.send(command); | ||
* ``` | ||
* | ||
* @see {@link ListConformancePackComplianceScoresCommandInput} for command's `input` shape. | ||
* @see {@link ListConformancePackComplianceScoresCommandOutput} for command's `response` shape. | ||
* @see {@link ConfigServiceClientResolvedConfig | config} for ConfigServiceClient's `config` shape. | ||
* | ||
*/ | ||
export class ListConformancePackComplianceScoresCommand extends $Command< | ||
ListConformancePackComplianceScoresCommandInput, | ||
ListConformancePackComplianceScoresCommandOutput, | ||
ConfigServiceClientResolvedConfig | ||
> { | ||
// Start section: command_properties | ||
// End section: command_properties | ||
|
||
constructor(readonly input: ListConformancePackComplianceScoresCommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: ConfigServiceClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<ListConformancePackComplianceScoresCommandInput, ListConformancePackComplianceScoresCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "ConfigServiceClient"; | ||
const commandName = "ListConformancePackComplianceScoresCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: ListConformancePackComplianceScoresRequestFilterSensitiveLog, | ||
outputFilterSensitiveLog: ListConformancePackComplianceScoresResponseFilterSensitiveLog, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
private serialize( | ||
input: ListConformancePackComplianceScoresCommandInput, | ||
context: __SerdeContext | ||
): Promise<__HttpRequest> { | ||
return serializeAws_json1_1ListConformancePackComplianceScoresCommand(input, context); | ||
} | ||
|
||
private deserialize( | ||
output: __HttpResponse, | ||
context: __SerdeContext | ||
): Promise<ListConformancePackComplianceScoresCommandOutput> { | ||
return deserializeAws_json1_1ListConformancePackComplianceScoresCommand(output, context); | ||
} | ||
|
||
// Start section: command_body_extra | ||
// End section: command_body_extra | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.