-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(client-emr-containers): This release adds GetManagedEndpointSess…
…ionCredentials, a new API that allows customers to generate an auth token to connect to a managed endpoint, enabling features such as self-hosted Jupyter notebooks for EMR on EKS.
- Loading branch information
awstools
committed
Apr 27, 2023
1 parent
ad22454
commit ab0a6d0
Showing
10 changed files
with
1,010 additions
and
272 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
165 changes: 165 additions & 0 deletions
165
clients/client-emr-containers/src/commands/GetManagedEndpointSessionCredentialsCommand.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,165 @@ | ||
// smithy-typescript generated code | ||
import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; | ||
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 { EMRContainersClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../EMRContainersClient"; | ||
import { | ||
GetManagedEndpointSessionCredentialsRequest, | ||
GetManagedEndpointSessionCredentialsResponse, | ||
GetManagedEndpointSessionCredentialsResponseFilterSensitiveLog, | ||
} from "../models/models_0"; | ||
import { | ||
de_GetManagedEndpointSessionCredentialsCommand, | ||
se_GetManagedEndpointSessionCredentialsCommand, | ||
} from "../protocols/Aws_restJson1"; | ||
|
||
/** | ||
* @public | ||
* | ||
* The input for {@link GetManagedEndpointSessionCredentialsCommand}. | ||
*/ | ||
export interface GetManagedEndpointSessionCredentialsCommandInput extends GetManagedEndpointSessionCredentialsRequest {} | ||
/** | ||
* @public | ||
* | ||
* The output of {@link GetManagedEndpointSessionCredentialsCommand}. | ||
*/ | ||
export interface GetManagedEndpointSessionCredentialsCommandOutput | ||
extends GetManagedEndpointSessionCredentialsResponse, | ||
__MetadataBearer {} | ||
|
||
/** | ||
* @public | ||
* <p>Generate a session token to connect to a managed endpoint. </p> | ||
* @example | ||
* Use a bare-bones client and the command you need to make an API call. | ||
* ```javascript | ||
* import { EMRContainersClient, GetManagedEndpointSessionCredentialsCommand } from "@aws-sdk/client-emr-containers"; // ES Modules import | ||
* // const { EMRContainersClient, GetManagedEndpointSessionCredentialsCommand } = require("@aws-sdk/client-emr-containers"); // CommonJS import | ||
* const client = new EMRContainersClient(config); | ||
* const input = { // GetManagedEndpointSessionCredentialsRequest | ||
* endpointIdentifier: "STRING_VALUE", // required | ||
* virtualClusterIdentifier: "STRING_VALUE", // required | ||
* executionRoleArn: "STRING_VALUE", // required | ||
* credentialType: "STRING_VALUE", // required | ||
* durationInSeconds: Number("int"), | ||
* logContext: "STRING_VALUE", | ||
* clientToken: "STRING_VALUE", | ||
* }; | ||
* const command = new GetManagedEndpointSessionCredentialsCommand(input); | ||
* const response = await client.send(command); | ||
* ``` | ||
* | ||
* @param GetManagedEndpointSessionCredentialsCommandInput - {@link GetManagedEndpointSessionCredentialsCommandInput} | ||
* @returns {@link GetManagedEndpointSessionCredentialsCommandOutput} | ||
* @see {@link GetManagedEndpointSessionCredentialsCommandInput} for command's `input` shape. | ||
* @see {@link GetManagedEndpointSessionCredentialsCommandOutput} for command's `response` shape. | ||
* @see {@link EMRContainersClientResolvedConfig | config} for EMRContainersClient's `config` shape. | ||
* | ||
* @throws {@link InternalServerException} (server fault) | ||
* <p>This is an internal server exception.</p> | ||
* | ||
* @throws {@link RequestThrottledException} (client fault) | ||
* <p>The request throttled.</p> | ||
* | ||
* @throws {@link ResourceNotFoundException} (client fault) | ||
* <p>The specified resource was not found.</p> | ||
* | ||
* @throws {@link ValidationException} (client fault) | ||
* <p>There are invalid parameters in the client request.</p> | ||
* | ||
* | ||
*/ | ||
export class GetManagedEndpointSessionCredentialsCommand extends $Command< | ||
GetManagedEndpointSessionCredentialsCommandInput, | ||
GetManagedEndpointSessionCredentialsCommandOutput, | ||
EMRContainersClientResolvedConfig | ||
> { | ||
// 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: GetManagedEndpointSessionCredentialsCommandInput) { | ||
// Start section: command_constructor | ||
super(); | ||
// End section: command_constructor | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
resolveMiddleware( | ||
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, | ||
configuration: EMRContainersClientResolvedConfig, | ||
options?: __HttpHandlerOptions | ||
): Handler<GetManagedEndpointSessionCredentialsCommandInput, GetManagedEndpointSessionCredentialsCommandOutput> { | ||
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); | ||
this.middlewareStack.use( | ||
getEndpointPlugin(configuration, GetManagedEndpointSessionCredentialsCommand.getEndpointParameterInstructions()) | ||
); | ||
|
||
const stack = clientStack.concat(this.middlewareStack); | ||
|
||
const { logger } = configuration; | ||
const clientName = "EMRContainersClient"; | ||
const commandName = "GetManagedEndpointSessionCredentialsCommand"; | ||
const handlerExecutionContext: HandlerExecutionContext = { | ||
logger, | ||
clientName, | ||
commandName, | ||
inputFilterSensitiveLog: (_: any) => _, | ||
outputFilterSensitiveLog: GetManagedEndpointSessionCredentialsResponseFilterSensitiveLog, | ||
}; | ||
const { requestHandler } = configuration; | ||
return stack.resolve( | ||
(request: FinalizeHandlerArguments<any>) => | ||
requestHandler.handle(request.request as __HttpRequest, options || {}), | ||
handlerExecutionContext | ||
); | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
private serialize( | ||
input: GetManagedEndpointSessionCredentialsCommandInput, | ||
context: __SerdeContext | ||
): Promise<__HttpRequest> { | ||
return se_GetManagedEndpointSessionCredentialsCommand(input, context); | ||
} | ||
|
||
/** | ||
* @internal | ||
*/ | ||
private deserialize( | ||
output: __HttpResponse, | ||
context: __SerdeContext | ||
): Promise<GetManagedEndpointSessionCredentialsCommandOutput> { | ||
return de_GetManagedEndpointSessionCredentialsCommand(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
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.