|
| 1 | +// smithy-typescript generated code |
| 2 | +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; |
| 3 | +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; |
| 4 | +import { Command as $Command } from "@aws-sdk/smithy-client"; |
| 5 | +import { |
| 6 | + FinalizeHandlerArguments, |
| 7 | + Handler, |
| 8 | + HandlerExecutionContext, |
| 9 | + HttpHandlerOptions as __HttpHandlerOptions, |
| 10 | + MetadataBearer as __MetadataBearer, |
| 11 | + MiddlewareStack, |
| 12 | + SerdeContext as __SerdeContext, |
| 13 | +} from "@aws-sdk/types"; |
| 14 | + |
| 15 | +import { ConfigServiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ConfigServiceClient"; |
| 16 | +import { |
| 17 | + ListConformancePackComplianceScoresRequest, |
| 18 | + ListConformancePackComplianceScoresRequestFilterSensitiveLog, |
| 19 | + ListConformancePackComplianceScoresResponse, |
| 20 | + ListConformancePackComplianceScoresResponseFilterSensitiveLog, |
| 21 | +} from "../models/models_0"; |
| 22 | +import { |
| 23 | + deserializeAws_json1_1ListConformancePackComplianceScoresCommand, |
| 24 | + serializeAws_json1_1ListConformancePackComplianceScoresCommand, |
| 25 | +} from "../protocols/Aws_json1_1"; |
| 26 | + |
| 27 | +export interface ListConformancePackComplianceScoresCommandInput extends ListConformancePackComplianceScoresRequest {} |
| 28 | +export interface ListConformancePackComplianceScoresCommandOutput |
| 29 | + extends ListConformancePackComplianceScoresResponse, |
| 30 | + __MetadataBearer {} |
| 31 | + |
| 32 | +/** |
| 33 | + * <p>Returns a list of conformance pack compliance scores. |
| 34 | + * 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. |
| 35 | + * 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 |
| 36 | + * compliance deviations in your conformance packs.</p> |
| 37 | + * @example |
| 38 | + * Use a bare-bones client and the command you need to make an API call. |
| 39 | + * ```javascript |
| 40 | + * import { ConfigServiceClient, ListConformancePackComplianceScoresCommand } from "@aws-sdk/client-config-service"; // ES Modules import |
| 41 | + * // const { ConfigServiceClient, ListConformancePackComplianceScoresCommand } = require("@aws-sdk/client-config-service"); // CommonJS import |
| 42 | + * const client = new ConfigServiceClient(config); |
| 43 | + * const command = new ListConformancePackComplianceScoresCommand(input); |
| 44 | + * const response = await client.send(command); |
| 45 | + * ``` |
| 46 | + * |
| 47 | + * @see {@link ListConformancePackComplianceScoresCommandInput} for command's `input` shape. |
| 48 | + * @see {@link ListConformancePackComplianceScoresCommandOutput} for command's `response` shape. |
| 49 | + * @see {@link ConfigServiceClientResolvedConfig | config} for ConfigServiceClient's `config` shape. |
| 50 | + * |
| 51 | + */ |
| 52 | +export class ListConformancePackComplianceScoresCommand extends $Command< |
| 53 | + ListConformancePackComplianceScoresCommandInput, |
| 54 | + ListConformancePackComplianceScoresCommandOutput, |
| 55 | + ConfigServiceClientResolvedConfig |
| 56 | +> { |
| 57 | + // Start section: command_properties |
| 58 | + // End section: command_properties |
| 59 | + |
| 60 | + constructor(readonly input: ListConformancePackComplianceScoresCommandInput) { |
| 61 | + // Start section: command_constructor |
| 62 | + super(); |
| 63 | + // End section: command_constructor |
| 64 | + } |
| 65 | + |
| 66 | + /** |
| 67 | + * @internal |
| 68 | + */ |
| 69 | + resolveMiddleware( |
| 70 | + clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, |
| 71 | + configuration: ConfigServiceClientResolvedConfig, |
| 72 | + options?: __HttpHandlerOptions |
| 73 | + ): Handler<ListConformancePackComplianceScoresCommandInput, ListConformancePackComplianceScoresCommandOutput> { |
| 74 | + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); |
| 75 | + |
| 76 | + const stack = clientStack.concat(this.middlewareStack); |
| 77 | + |
| 78 | + const { logger } = configuration; |
| 79 | + const clientName = "ConfigServiceClient"; |
| 80 | + const commandName = "ListConformancePackComplianceScoresCommand"; |
| 81 | + const handlerExecutionContext: HandlerExecutionContext = { |
| 82 | + logger, |
| 83 | + clientName, |
| 84 | + commandName, |
| 85 | + inputFilterSensitiveLog: ListConformancePackComplianceScoresRequestFilterSensitiveLog, |
| 86 | + outputFilterSensitiveLog: ListConformancePackComplianceScoresResponseFilterSensitiveLog, |
| 87 | + }; |
| 88 | + const { requestHandler } = configuration; |
| 89 | + return stack.resolve( |
| 90 | + (request: FinalizeHandlerArguments<any>) => |
| 91 | + requestHandler.handle(request.request as __HttpRequest, options || {}), |
| 92 | + handlerExecutionContext |
| 93 | + ); |
| 94 | + } |
| 95 | + |
| 96 | + private serialize( |
| 97 | + input: ListConformancePackComplianceScoresCommandInput, |
| 98 | + context: __SerdeContext |
| 99 | + ): Promise<__HttpRequest> { |
| 100 | + return serializeAws_json1_1ListConformancePackComplianceScoresCommand(input, context); |
| 101 | + } |
| 102 | + |
| 103 | + private deserialize( |
| 104 | + output: __HttpResponse, |
| 105 | + context: __SerdeContext |
| 106 | + ): Promise<ListConformancePackComplianceScoresCommandOutput> { |
| 107 | + return deserializeAws_json1_1ListConformancePackComplianceScoresCommand(output, context); |
| 108 | + } |
| 109 | + |
| 110 | + // Start section: command_body_extra |
| 111 | + // End section: command_body_extra |
| 112 | +} |
0 commit comments