diff --git a/clients/client-migrationhub-config/README.md b/clients/client-migrationhub-config/README.md index 561a6e3ec369..0f2e8bad0bed 100644 --- a/clients/client-migrationhub-config/README.md +++ b/clients/client-migrationhub-config/README.md @@ -9,7 +9,6 @@ AWS SDK for JavaScript MigrationHubConfig Client for Node.js, Browser and React
The AWS Migration Hub home region APIs are available specifically for working with your Migration Hub home region. You can use these APIs to determine a home region, as well as to create and work with controls that describe the home region.
-You must make API calls for write actions (create, notify, associate, disassociate, @@ -29,7 +28,6 @@ is returned.
home region.For specific API usage, see the sections that follow in this AWS Migration Hub Home Region API reference.
@@ -235,6 +233,14 @@ CreateHomeRegionControl [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-migrationhub-config/classes/createhomeregioncontrolcommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-migrationhub-config/interfaces/createhomeregioncontrolcommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-migrationhub-config/interfaces/createhomeregioncontrolcommandoutput.html) + +The AWS Migration Hub home region APIs are available specifically for working with your * Migration Hub home region. You can use these APIs to determine a home region, as well as to * create and work with controls that describe the home region.
- * *You must make API calls for write actions (create, notify, associate, disassociate, @@ -97,7 +119,6 @@ export interface MigrationHubConfig { * home region.
*For specific API usage, see the sections that follow in this AWS Migration Hub Home Region * API reference.
*/ diff --git a/clients/client-migrationhub-config/src/MigrationHubConfigClient.ts b/clients/client-migrationhub-config/src/MigrationHubConfigClient.ts index 6618e9380719..6014769ba9ed 100644 --- a/clients/client-migrationhub-config/src/MigrationHubConfigClient.ts +++ b/clients/client-migrationhub-config/src/MigrationHubConfigClient.ts @@ -54,6 +54,10 @@ import { CreateHomeRegionControlCommandInput, CreateHomeRegionControlCommandOutput, } from "./commands/CreateHomeRegionControlCommand"; +import { + DeleteHomeRegionControlCommandInput, + DeleteHomeRegionControlCommandOutput, +} from "./commands/DeleteHomeRegionControlCommand"; import { DescribeHomeRegionControlsCommandInput, DescribeHomeRegionControlsCommandOutput, @@ -75,6 +79,7 @@ export { __Client }; */ export type ServiceInputTypes = | CreateHomeRegionControlCommandInput + | DeleteHomeRegionControlCommandInput | DescribeHomeRegionControlsCommandInput | GetHomeRegionCommandInput; @@ -83,6 +88,7 @@ export type ServiceInputTypes = */ export type ServiceOutputTypes = | CreateHomeRegionControlCommandOutput + | DeleteHomeRegionControlCommandOutput | DescribeHomeRegionControlsCommandOutput | GetHomeRegionCommandOutput; @@ -261,7 +267,6 @@ export interface MigrationHubConfigClientResolvedConfig extends MigrationHubConf *The AWS Migration Hub home region APIs are available specifically for working with your * Migration Hub home region. You can use these APIs to determine a home region, as well as to * create and work with controls that describe the home region.
- * *You must make API calls for write actions (create, notify, associate, disassociate, @@ -281,7 +286,6 @@ export interface MigrationHubConfigClientResolvedConfig extends MigrationHubConf * home region.
*For specific API usage, see the sections that follow in this AWS Migration Hub Home Region * API reference.
*/ diff --git a/clients/client-migrationhub-config/src/commands/DeleteHomeRegionControlCommand.ts b/clients/client-migrationhub-config/src/commands/DeleteHomeRegionControlCommand.ts new file mode 100644 index 000000000000..c2cd521e1db3 --- /dev/null +++ b/clients/client-migrationhub-config/src/commands/DeleteHomeRegionControlCommand.ts @@ -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 + *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.
+ * @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) + *You do not have sufficient access to perform this action.
+ * + * @throws {@link InternalServerError} (server fault) + *Exception raised when an internal, configuration, or dependency error is + * encountered.
+ * + * @throws {@link InvalidInputException} (client fault) + *Exception raised when the provided input violates a policy constraint or is entered in the + * wrong format or data type.
+ * + * @throws {@link ServiceUnavailableException} (server fault) + *Exception raised when a request fails due to temporary unavailability of the + * service.
+ * + * @throws {@link ThrottlingException} (client fault) + *The request was denied due to request throttling.
+ * + * @throws {@link MigrationHubConfigServiceException} + *Base exception class for all service exceptions from MigrationHubConfig service.
+ * + */ +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: MiddlewareStackThe AWS Migration Hub home region APIs are available specifically for working with your * Migration Hub home region. You can use these APIs to determine a home region, as well as to * create and work with controls that describe the home region.
- * *You must make API calls for write actions (create, notify, associate, disassociate, @@ -24,7 +23,6 @@ * home region.
*For specific API usage, see the sections that follow in this AWS Migration Hub Home Region * API reference.
* diff --git a/clients/client-migrationhub-config/src/models/models_0.ts b/clients/client-migrationhub-config/src/models/models_0.ts index be205244d32c..0d9ad9ea4a2e 100644 --- a/clients/client-migrationhub-config/src/models/models_0.ts +++ b/clients/client-migrationhub-config/src/models/models_0.ts @@ -253,6 +253,23 @@ export class ThrottlingException extends __BaseException { } } +/** + * @public + */ +export interface DeleteHomeRegionControlRequest { + /** + * @public + *A unique identifier that's generated for each home region control. It's always a string + * that begins with "hrc-" followed by 12 lowercase letters and numbers.
+ */ + ControlId: string | undefined; +} + +/** + * @public + */ +export interface DeleteHomeRegionControlResult {} + /** * @public */ diff --git a/clients/client-migrationhub-config/src/protocols/Aws_json1_1.ts b/clients/client-migrationhub-config/src/protocols/Aws_json1_1.ts index 4e8cf27290c3..dd5278c6fd19 100644 --- a/clients/client-migrationhub-config/src/protocols/Aws_json1_1.ts +++ b/clients/client-migrationhub-config/src/protocols/Aws_json1_1.ts @@ -22,6 +22,10 @@ import { CreateHomeRegionControlCommandInput, CreateHomeRegionControlCommandOutput, } from "../commands/CreateHomeRegionControlCommand"; +import { + DeleteHomeRegionControlCommandInput, + DeleteHomeRegionControlCommandOutput, +} from "../commands/DeleteHomeRegionControlCommand"; import { DescribeHomeRegionControlsCommandInput, DescribeHomeRegionControlsCommandOutput, @@ -32,6 +36,7 @@ import { AccessDeniedException, CreateHomeRegionControlRequest, CreateHomeRegionControlResult, + DeleteHomeRegionControlRequest, DescribeHomeRegionControlsRequest, DescribeHomeRegionControlsResult, DryRunOperation, @@ -57,6 +62,19 @@ export const se_CreateHomeRegionControlCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1DeleteHomeRegionControlCommand + */ +export const se_DeleteHomeRegionControlCommand = async ( + input: DeleteHomeRegionControlCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DeleteHomeRegionControl"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1DescribeHomeRegionControlsCommand */ @@ -144,6 +162,64 @@ const de_CreateHomeRegionControlCommandError = async ( } }; +/** + * deserializeAws_json1_1DeleteHomeRegionControlCommand + */ +export const de_DeleteHomeRegionControlCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): PromiseThe AWS Migration Hub home region APIs are available specifically for working with your\n Migration Hub home region. You can use these APIs to determine a home region, as well as to\n create and work with controls that describe the home region.
\n\nYou must make API calls for write actions (create, notify, associate, disassociate,\n import, or put) while in your home region, or a HomeRegionNotSetException
\n error is returned.
API calls for read actions (list, describe, stop, and delete) are permitted outside of\n your home region.
\nIf you call a write API outside the home region, an InvalidInputException
\n is returned.
You can call GetHomeRegion
action to obtain the account's Migration Hub\n home region.
For specific API usage, see the sections that follow in this AWS Migration Hub Home Region\n API reference.
", + "smithy.api#documentation": "The AWS Migration Hub home region APIs are available specifically for working with your\n Migration Hub home region. You can use these APIs to determine a home region, as well as to\n create and work with controls that describe the home region.
\nYou must make API calls for write actions (create, notify, associate, disassociate,\n import, or put) while in your home region, or a HomeRegionNotSetException
\n error is returned.
API calls for read actions (list, describe, stop, and delete) are permitted outside of\n your home region.
\nIf you call a write API outside the home region, an InvalidInputException
\n is returned.
You can call GetHomeRegion
action to obtain the account's Migration Hub\n home region.
For specific API usage, see the sections that follow in this AWS Migration Hub Home Region\n API reference.
", "smithy.api#title": "AWS Migration Hub Config", "smithy.rules#endpointRuleSet": { "version": "1.0", @@ -784,6 +787,57 @@ "smithy.api#output": {} } }, + "com.amazonaws.migrationhubconfig#DeleteHomeRegionControl": { + "type": "operation", + "input": { + "target": "com.amazonaws.migrationhubconfig#DeleteHomeRegionControlRequest" + }, + "output": { + "target": "com.amazonaws.migrationhubconfig#DeleteHomeRegionControlResult" + }, + "errors": [ + { + "target": "com.amazonaws.migrationhubconfig#AccessDeniedException" + }, + { + "target": "com.amazonaws.migrationhubconfig#InternalServerError" + }, + { + "target": "com.amazonaws.migrationhubconfig#InvalidInputException" + }, + { + "target": "com.amazonaws.migrationhubconfig#ServiceUnavailableException" + }, + { + "target": "com.amazonaws.migrationhubconfig#ThrottlingException" + } + ], + "traits": { + "smithy.api#documentation": "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.
" + } + }, + "com.amazonaws.migrationhubconfig#DeleteHomeRegionControlRequest": { + "type": "structure", + "members": { + "ControlId": { + "target": "com.amazonaws.migrationhubconfig#ControlId", + "traits": { + "smithy.api#documentation": "A unique identifier that's generated for each home region control. It's always a string\n that begins with \"hrc-\" followed by 12 lowercase letters and numbers.
", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.migrationhubconfig#DeleteHomeRegionControlResult": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.migrationhubconfig#DescribeHomeRegionControls": { "type": "operation", "input": {