-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-sagemaker-edge): Amazon SageMaker Edge Manager provides l…
…ightweight model deployment feature to deploy machine learning models on requested devices.
- Loading branch information
awstools
committed
Jul 19, 2022
1 parent
6481e59
commit 316a691
Showing
8 changed files
with
968 additions
and
34 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
96 changes: 96 additions & 0 deletions
96
clients/client-sagemaker-edge/src/commands/GetDeploymentsCommand.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,96 @@ | ||
// 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 { GetDeploymentsRequest, GetDeploymentsResult } from "../models/models_0"; | ||
import { | ||
deserializeAws_restJson1GetDeploymentsCommand, | ||
serializeAws_restJson1GetDeploymentsCommand, | ||
} from "../protocols/Aws_restJson1"; | ||
import { SagemakerEdgeClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SagemakerEdgeClient"; | ||
|
||
export interface GetDeploymentsCommandInput extends GetDeploymentsRequest {} | ||
export interface GetDeploymentsCommandOutput extends GetDeploymentsResult, __MetadataBearer {} | ||
|
||
/** | ||
* <p>Use to get the active deployments from a device.</p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { SagemakerEdgeClient, GetDeploymentsCommand } from "@aws-sdk/client-sagemaker-edge"; // ES Modules import | ||
* // const { SagemakerEdgeClient, GetDeploymentsCommand } = require("@aws-sdk/client-sagemaker-edge"); // CommonJS import | ||
* const client = new SagemakerEdgeClient(config); | ||
* const command = new GetDeploymentsCommand(input); | ||
* const response = await client.send(command); | ||
* ``` | ||
* | ||
* @see {@link GetDeploymentsCommandInput} for command's `input` shape. | ||
* @see {@link GetDeploymentsCommandOutput} for command's `response` shape. | ||
* @see {@link SagemakerEdgeClientResolvedConfig | config} for SagemakerEdgeClient's `config` shape. | ||
* | ||
*/ | ||
export class GetDeploymentsCommand extends $Command< | ||
GetDeploymentsCommandInput, | ||
GetDeploymentsCommandOutput, | ||
SagemakerEdgeClientResolvedConfig | ||
> { | ||
// Start section: command_properties | ||
// End section: command_properties | ||
|
||
constructor(readonly input: GetDeploymentsCommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: SagemakerEdgeClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<GetDeploymentsCommandInput, GetDeploymentsCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "SagemakerEdgeClient"; | ||
const commandName = "GetDeploymentsCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: GetDeploymentsRequest.filterSensitiveLog, | ||
outputFilterSensitiveLog: GetDeploymentsResult.filterSensitiveLog, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
private serialize(input: GetDeploymentsCommandInput, context: __SerdeContext): Promise<__HttpRequest> { | ||
return serializeAws_restJson1GetDeploymentsCommand(input, context); | ||
} | ||
|
||
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetDeploymentsCommandOutput> { | ||
return deserializeAws_restJson1GetDeploymentsCommand(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,3 +1,4 @@ | ||
// smithy-typescript generated code | ||
export * from "./GetDeploymentsCommand"; | ||
export * from "./GetDeviceRegistrationCommand"; | ||
export * from "./SendHeartbeatCommand"; |
Oops, something went wrong.