-
Notifications
You must be signed in to change notification settings - Fork 588
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-cloudwatch): Add support for managed Contributor Insights…
… Rules
- Loading branch information
awstools
committed
Aug 18, 2022
1 parent
1efffd9
commit 101b4c2
Showing
11 changed files
with
1,264 additions
and
18 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
107 changes: 107 additions & 0 deletions
107
clients/client-cloudwatch/src/commands/ListManagedInsightRulesCommand.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,107 @@ | ||
// 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 { CloudWatchClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CloudWatchClient"; | ||
import { | ||
ListManagedInsightRulesInput, | ||
ListManagedInsightRulesInputFilterSensitiveLog, | ||
ListManagedInsightRulesOutput, | ||
ListManagedInsightRulesOutputFilterSensitiveLog, | ||
} from "../models/models_0"; | ||
import { | ||
deserializeAws_queryListManagedInsightRulesCommand, | ||
serializeAws_queryListManagedInsightRulesCommand, | ||
} from "../protocols/Aws_query"; | ||
|
||
export interface ListManagedInsightRulesCommandInput extends ListManagedInsightRulesInput {} | ||
export interface ListManagedInsightRulesCommandOutput extends ListManagedInsightRulesOutput, __MetadataBearer {} | ||
|
||
/** | ||
* <p> | ||
* Returns a list | ||
* that contains the number | ||
* of managed Contributor Insights rules | ||
* in your account. | ||
* | ||
* </p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { CloudWatchClient, ListManagedInsightRulesCommand } from "@aws-sdk/client-cloudwatch"; // ES Modules import | ||
* // const { CloudWatchClient, ListManagedInsightRulesCommand } = require("@aws-sdk/client-cloudwatch"); // CommonJS import | ||
* const client = new CloudWatchClient(config); | ||
* const command = new ListManagedInsightRulesCommand(input); | ||
* const response = await client.send(command); | ||
* ``` | ||
* | ||
* @see {@link ListManagedInsightRulesCommandInput} for command's `input` shape. | ||
* @see {@link ListManagedInsightRulesCommandOutput} for command's `response` shape. | ||
* @see {@link CloudWatchClientResolvedConfig | config} for CloudWatchClient's `config` shape. | ||
* | ||
*/ | ||
export class ListManagedInsightRulesCommand extends $Command< | ||
ListManagedInsightRulesCommandInput, | ||
ListManagedInsightRulesCommandOutput, | ||
CloudWatchClientResolvedConfig | ||
> { | ||
// Start section: command_properties | ||
// End section: command_properties | ||
|
||
constructor(readonly input: ListManagedInsightRulesCommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: CloudWatchClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<ListManagedInsightRulesCommandInput, ListManagedInsightRulesCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "CloudWatchClient"; | ||
const commandName = "ListManagedInsightRulesCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: ListManagedInsightRulesInputFilterSensitiveLog, | ||
outputFilterSensitiveLog: ListManagedInsightRulesOutputFilterSensitiveLog, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
private serialize(input: ListManagedInsightRulesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { | ||
return serializeAws_queryListManagedInsightRulesCommand(input, context); | ||
} | ||
|
||
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<ListManagedInsightRulesCommandOutput> { | ||
return deserializeAws_queryListManagedInsightRulesCommand(output, context); | ||
} | ||
|
||
// Start section: command_body_extra | ||
// End section: command_body_extra | ||
} |
Oops, something went wrong.