Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-account): This release enables customers to manage the pr…
…imary contact information for their AWS accounts. For more information, see https://docs.aws.amazon.com/accounts/latest/reference/API_Operations.html
- Loading branch information
awstools
committed
Jul 22, 2022
1 parent
b6e2600
commit f456886
Showing
11 changed files
with
1,068 additions
and
28 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
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
98 changes: 98 additions & 0 deletions
98
clients/client-account/src/commands/GetContactInformationCommand.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,98 @@ | ||
// 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 { AccountClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AccountClient"; | ||
import { GetContactInformationRequest, GetContactInformationResponse } from "../models/models_0"; | ||
import { | ||
deserializeAws_restJson1GetContactInformationCommand, | ||
serializeAws_restJson1GetContactInformationCommand, | ||
} from "../protocols/Aws_restJson1"; | ||
|
||
export interface GetContactInformationCommandInput extends GetContactInformationRequest {} | ||
export interface GetContactInformationCommandOutput extends GetContactInformationResponse, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Retrieves the primary contact information of an Amazon Web Services account.</p> | ||
* <p>For complete details about how to use the primary contact operations, see <a href="https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html">Update | ||
* the primary and alternate contact information</a>.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { AccountClient, GetContactInformationCommand } from "@aws-sdk/client-account"; // ES Modules import | ||
* // const { AccountClient, GetContactInformationCommand } = require("@aws-sdk/client-account"); // CommonJS import | ||
* const client = new AccountClient(config); | ||
* const command = new GetContactInformationCommand(input); | ||
* const response = await client.send(command); | ||
* ``` | ||
* | ||
* @see {@link GetContactInformationCommandInput} for command's `input` shape. | ||
* @see {@link GetContactInformationCommandOutput} for command's `response` shape. | ||
* @see {@link AccountClientResolvedConfig | config} for AccountClient's `config` shape. | ||
* | ||
*/ | ||
export class GetContactInformationCommand extends $Command< | ||
GetContactInformationCommandInput, | ||
GetContactInformationCommandOutput, | ||
AccountClientResolvedConfig | ||
> { | ||
// Start section: command_properties | ||
// End section: command_properties | ||
|
||
constructor(readonly input: GetContactInformationCommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: AccountClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<GetContactInformationCommandInput, GetContactInformationCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "AccountClient"; | ||
const commandName = "GetContactInformationCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: GetContactInformationRequest.filterSensitiveLog, | ||
outputFilterSensitiveLog: GetContactInformationResponse.filterSensitiveLog, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
private serialize(input: GetContactInformationCommandInput, context: __SerdeContext): Promise<__HttpRequest> { | ||
return serializeAws_restJson1GetContactInformationCommand(input, context); | ||
} | ||
|
||
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetContactInformationCommandOutput> { | ||
return deserializeAws_restJson1GetContactInformationCommand(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
Oops, something went wrong.