-
Notifications
You must be signed in to change notification settings - Fork 565
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-migrationhub-config): This release introduces DeleteHomeR…
…egionControl API that customers can use to delete the Migration Hub Home Region configuration
- Loading branch information
awstools
committed
Oct 24, 2023
1 parent
1ccadc3
commit 442a399
Showing
9 changed files
with
357 additions
and
9 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
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
167 changes: 167 additions & 0 deletions
167
clients/client-migrationhub-config/src/commands/DeleteHomeRegionControlCommand.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,167 @@ | ||
// smithy-typescript generated code | ||
import { EndpointParameterInstructions, getEndpointPlugin } from "@smithy/middleware-endpoint"; | ||
import { getSerdePlugin } from "@smithy/middleware-serde"; | ||
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http"; | ||
import { Command as $Command } from "@smithy/smithy-client"; | ||
import { | ||
FinalizeHandlerArguments, | ||
Handler, | ||
HandlerExecutionContext, | ||
HttpHandlerOptions as __HttpHandlerOptions, | ||
MetadataBearer as __MetadataBearer, | ||
MiddlewareStack, | ||
SerdeContext as __SerdeContext, | ||
SMITHY_CONTEXT_KEY, | ||
} from "@smithy/types"; | ||
|
||
import { | ||
MigrationHubConfigClientResolvedConfig, | ||
ServiceInputTypes, | ||
ServiceOutputTypes, | ||
} from "../MigrationHubConfigClient"; | ||
import { DeleteHomeRegionControlRequest, DeleteHomeRegionControlResult } from "../models/models_0"; | ||
import { de_DeleteHomeRegionControlCommand, se_DeleteHomeRegionControlCommand } from "../protocols/Aws_json1_1"; | ||
|
||
/** | ||
* @public | ||
*/ | ||
export { __MetadataBearer, $Command }; | ||
/** | ||
* @public | ||
* | ||
* The input for {@link DeleteHomeRegionControlCommand}. | ||
*/ | ||
export interface DeleteHomeRegionControlCommandInput extends DeleteHomeRegionControlRequest {} | ||
/** | ||
* @public | ||
* | ||
* The output of {@link DeleteHomeRegionControlCommand}. | ||
*/ | ||
export interface DeleteHomeRegionControlCommandOutput extends DeleteHomeRegionControlResult, __MetadataBearer {} | ||
|
||
/** | ||
* @public | ||
* <p>This operation deletes the home region configuration for the calling account. The operation does not delete discovery or migration tracking data in the home region.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { MigrationHubConfigClient, DeleteHomeRegionControlCommand } from "@aws-sdk/client-migrationhub-config"; // ES Modules import | ||
* // const { MigrationHubConfigClient, DeleteHomeRegionControlCommand } = require("@aws-sdk/client-migrationhub-config"); // CommonJS import | ||
* const client = new MigrationHubConfigClient(config); | ||
* const input = { // DeleteHomeRegionControlRequest | ||
* ControlId: "STRING_VALUE", // required | ||
* }; | ||
* const command = new DeleteHomeRegionControlCommand(input); | ||
* const response = await client.send(command); | ||
* // {}; | ||
* | ||
* ``` | ||
* | ||
* @param DeleteHomeRegionControlCommandInput - {@link DeleteHomeRegionControlCommandInput} | ||
* @returns {@link DeleteHomeRegionControlCommandOutput} | ||
* @see {@link DeleteHomeRegionControlCommandInput} for command's `input` shape. | ||
* @see {@link DeleteHomeRegionControlCommandOutput} for command's `response` shape. | ||
* @see {@link MigrationHubConfigClientResolvedConfig | config} for MigrationHubConfigClient's `config` shape. | ||
* | ||
* @throws {@link AccessDeniedException} (client fault) | ||
* <p>You do not have sufficient access to perform this action.</p> | ||
* | ||
* @throws {@link InternalServerError} (server fault) | ||
* <p>Exception raised when an internal, configuration, or dependency error is | ||
* encountered.</p> | ||
* | ||
* @throws {@link InvalidInputException} (client fault) | ||
* <p>Exception raised when the provided input violates a policy constraint or is entered in the | ||
* wrong format or data type.</p> | ||
* | ||
* @throws {@link ServiceUnavailableException} (server fault) | ||
* <p>Exception raised when a request fails due to temporary unavailability of the | ||
* service.</p> | ||
* | ||
* @throws {@link ThrottlingException} (client fault) | ||
* <p>The request was denied due to request throttling.</p> | ||
* | ||
* @throws {@link MigrationHubConfigServiceException} | ||
* <p>Base exception class for all service exceptions from MigrationHubConfig service.</p> | ||
* | ||
*/ | ||
export class DeleteHomeRegionControlCommand extends $Command< | ||
DeleteHomeRegionControlCommandInput, | ||
DeleteHomeRegionControlCommandOutput, | ||
MigrationHubConfigClientResolvedConfig | ||
> { | ||
// Start section: command_properties | ||
// End section: command_properties | ||
|
||
public static getEndpointParameterInstructions(): EndpointParameterInstructions { | ||
return { | ||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, | ||
Endpoint: { type: "builtInParams", name: "endpoint" }, | ||
Region: { type: "builtInParams", name: "region" }, | ||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, | ||
}; | ||
} | ||
|
||
/** | ||
* @public | ||
*/ | ||
constructor(readonly input: DeleteHomeRegionControlCommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: MigrationHubConfigClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<DeleteHomeRegionControlCommandInput, DeleteHomeRegionControlCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
this.middlewareStack.use( | ||
getEndpointPlugin(configuration, DeleteHomeRegionControlCommand.getEndpointParameterInstructions()) | ||
); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "MigrationHubConfigClient"; | ||
const commandName = "DeleteHomeRegionControlCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: (_: any) => _, | ||
outputFilterSensitiveLog: (_: any) => _, | ||
[SMITHY_CONTEXT_KEY]: { | ||
service: "AWSMigrationHubMultiAccountService", | ||
operation: "DeleteHomeRegionControl", | ||
}, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
private serialize(input: DeleteHomeRegionControlCommandInput, context: __SerdeContext): Promise<__HttpRequest> { | ||
return se_DeleteHomeRegionControlCommand(input, context); | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DeleteHomeRegionControlCommandOutput> { | ||
return de_DeleteHomeRegionControlCommand(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
// smithy-typescript generated code | ||
export * from "./CreateHomeRegionControlCommand"; | ||
export * from "./DeleteHomeRegionControlCommand"; | ||
export * from "./DescribeHomeRegionControlsCommand"; | ||
export * from "./GetHomeRegionCommand"; |
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.