AWS SDK for JavaScript Bedrock Agentcore Control Client for Node.js, Browser and React Native
npm install @aws-sdk/client-bedrock-agentcore-controlAWS SDK for JavaScript BedrockAgentCoreControl Client for Node.js, Browser and React Native.
Welcome to the Amazon Bedrock AgentCore Control plane API reference. Control plane actions configure, create, modify, and monitor Amazon Web Services resources.
npm install @aws-sdk/client-bedrock-agentcore-controlyarn add @aws-sdk/client-bedrock-agentcore-controlpnpm add @aws-sdk/client-bedrock-agentcore-controlThe AWS SDK is modulized by clients and commands.
To send a request, you only need to import the BedrockAgentCoreControlClient and
the commands you need, for example ListAgentRuntimesCommand:
``js`
// ES5 example
const { BedrockAgentCoreControlClient, ListAgentRuntimesCommand } = require("@aws-sdk/client-bedrock-agentcore-control");
`ts`
// ES6+ example
import { BedrockAgentCoreControlClient, ListAgentRuntimesCommand } from "@aws-sdk/client-bedrock-agentcore-control";
To send a request, you:
- Initiate client with configuration (e.g. credentials, region).
- Initiate command with input parameters.
- Call send operation on client with command object as input.destroy()
- If you are using a custom http handler, you may call to close open connections.
`js
// a client can be shared by different commands.
const client = new BedrockAgentCoreControlClient({ region: "REGION" });
const params = { /* input parameters / };
const command = new ListAgentRuntimesCommand(params);
`
#### Async/await
We recommend using await
operator to wait for the promise returned by send operation as follows:
`js`
// async/await.
try {
const data = await client.send(command);
// process data.
} catch (error) {
// error handling.
} finally {
// finally.
}
Async-await is clean, concise, intuitive, easy to debug and has better error handling
as compared to using Promise chains or callbacks.
#### Promises
You can also use Promise chaining
to execute send operation.
`js`
client.send(command).then(
(data) => {
// process data.
},
(error) => {
// error handling.
}
);
Promises can also be called using .catch() and .finally() as follows:
`js`
client
.send(command)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
})
.finally(() => {
// finally.
});
#### Callbacks
We do not recommend using callbacks because of callback hell,
but they are supported by the send operation.
`js`
// callbacks.
client.send(command, (err, data) => {
// process err and data.
});
#### v2 compatible style
The client can also send requests using v2 compatible style.
However, it results in a bigger bundle size and may be dropped in next major version. More details in the blog post
on modular packages in AWS SDK for JavaScript
`ts
import * as AWS from "@aws-sdk/client-bedrock-agentcore-control";
const client = new AWS.BedrockAgentCoreControl({ region: "REGION" });
// async/await.
try {
const data = await client.listAgentRuntimes(params);
// process data.
} catch (error) {
// error handling.
}
// Promises.
client
.listAgentRuntimes(params)
.then((data) => {
// process data.
})
.catch((error) => {
// error handling.
});
// callbacks.
client.listAgentRuntimes(params, (err, data) => {
// process err and data.
});
`
When the service returns an exception, the error will include the exception information,
as well as response metadata (e.g. request id).
`js`
try {
const data = await client.send(command);
// process data.
} catch (error) {
const { requestId, cfId, extendedRequestId } = error.$metadata;
console.log({ requestId, cfId, extendedRequestId });
/**
* The keys within exceptions are also parsed.
* You can access them by specifying exception names:
* if (error.name === 'SomeServiceException') {
* const value = error.specialKeyInException;
* }
*/
}
Please use these community resources for getting help.
We use the GitHub issues for tracking bugs and feature requests, but have limited bandwidth to address them.
- Visit Developer Guide
or API Reference.
- Check out the blog posts tagged with aws-sdk-js
on AWS Developer Blog.
- Ask a question on StackOverflow and tag it with aws-sdk-js.
- Join the AWS JavaScript community on gitter.
- If it turns out that you may have found a bug, please open an issue.
To test your universal JavaScript code in Node.js, browser and react-native environments,
visit our code samples repo.
This client code is generated automatically. Any modifications will be overwritten the next time the @aws-sdk/client-bedrock-agentcore-control` package is updated.
To contribute to client you can check our generate clients scripts.
This SDK is distributed under the
Apache License, Version 2.0,
see LICENSE for more information.
CreateAgentRuntime
Command API Reference / Input / Output
CreateAgentRuntimeEndpoint
Command API Reference / Input / Output
CreateApiKeyCredentialProvider
Command API Reference / Input / Output
CreateBrowser
Command API Reference / Input / Output
CreateBrowserProfile
Command API Reference / Input / Output
CreateCodeInterpreter
Command API Reference / Input / Output
CreateEvaluator
Command API Reference / Input / Output
CreateGateway
Command API Reference / Input / Output
CreateGatewayTarget
Command API Reference / Input / Output
CreateMemory
Command API Reference / Input / Output
CreateOauth2CredentialProvider
Command API Reference / Input / Output
CreateOnlineEvaluationConfig
Command API Reference / Input / Output
CreatePolicy
Command API Reference / Input / Output
CreatePolicyEngine
Command API Reference / Input / Output
CreateWorkloadIdentity
Command API Reference / Input / Output
DeleteAgentRuntime
Command API Reference / Input / Output
DeleteAgentRuntimeEndpoint
Command API Reference / Input / Output
DeleteApiKeyCredentialProvider
Command API Reference / Input / Output
DeleteBrowser
Command API Reference / Input / Output
DeleteBrowserProfile
Command API Reference / Input / Output
DeleteCodeInterpreter
Command API Reference / Input / Output
DeleteEvaluator
Command API Reference / Input / Output
DeleteGateway
Command API Reference / Input / Output
DeleteGatewayTarget
Command API Reference / Input / Output
DeleteMemory
Command API Reference / Input / Output
DeleteOauth2CredentialProvider
Command API Reference / Input / Output
DeleteOnlineEvaluationConfig
Command API Reference / Input / Output
DeletePolicy
Command API Reference / Input / Output
DeletePolicyEngine
Command API Reference / Input / Output
DeleteResourcePolicy
Command API Reference / Input / Output
DeleteWorkloadIdentity
Command API Reference / Input / Output
GetAgentRuntime
Command API Reference / Input / Output
GetAgentRuntimeEndpoint
Command API Reference / Input / Output
GetApiKeyCredentialProvider
Command API Reference / Input / Output
GetBrowser
Command API Reference / Input / Output
GetBrowserProfile
Command API Reference / Input / Output
GetCodeInterpreter
Command API Reference / Input / Output
GetEvaluator
Command API Reference / Input / Output
GetGateway
Command API Reference / Input / Output
GetGatewayTarget
Command API Reference / Input / Output
GetMemory
Command API Reference / Input / Output
GetOauth2CredentialProvider
Command API Reference / Input / Output
GetOnlineEvaluationConfig
Command API Reference / Input / Output
GetPolicy
Command API Reference / Input / Output
GetPolicyEngine
Command API Reference / Input / Output
GetPolicyGeneration
Command API Reference / Input / Output
GetResourcePolicy
Command API Reference / Input / Output
GetTokenVault
Command API Reference / Input / Output
GetWorkloadIdentity
Command API Reference / Input / Output
ListAgentRuntimeEndpoints
Command API Reference / Input / Output
ListAgentRuntimes
Command API Reference / Input / Output
ListAgentRuntimeVersions
Command API Reference / Input / Output
ListApiKeyCredentialProviders
Command API Reference / Input / Output
ListBrowserProfiles
Command API Reference / Input / Output
ListBrowsers
Command API Reference / Input / Output
ListCodeInterpreters
Command API Reference / Input / Output
ListEvaluators
Command API Reference / Input / Output
ListGateways
Command API Reference / Input / Output
ListGatewayTargets
Command API Reference / Input / Output
ListMemories
Command API Reference / Input / Output
ListOauth2CredentialProviders
Command API Reference / Input / Output
ListOnlineEvaluationConfigs
Command API Reference / Input / Output
ListPolicies
Command API Reference / Input / Output
ListPolicyEngines
Command API Reference / Input / Output
ListPolicyGenerationAssets
Command API Reference / Input / Output
ListPolicyGenerations
Command API Reference / Input / Output
ListTagsForResource
Command API Reference / Input / Output
ListWorkloadIdentities
Command API Reference / Input / Output
PutResourcePolicy
Command API Reference / Input / Output
SetTokenVaultCMK
Command API Reference / Input / Output
StartPolicyGeneration
Command API Reference / Input / Output
SynchronizeGatewayTargets
Command API Reference / Input / Output
TagResource
Command API Reference / Input / Output
UntagResource
Command API Reference / Input / Output
UpdateAgentRuntime
Command API Reference / Input / Output
UpdateAgentRuntimeEndpoint
Command API Reference / Input / Output
UpdateApiKeyCredentialProvider
Command API Reference / Input / Output
UpdateEvaluator
Command API Reference / Input / Output
UpdateGateway
Command API Reference / Input / Output
UpdateGatewayTarget
Command API Reference / Input / Output
UpdateMemory
Command API Reference / Input / Output
UpdateOauth2CredentialProvider
Command API Reference / Input / Output
UpdateOnlineEvaluationConfig
Command API Reference / Input / Output
UpdatePolicy
Command API Reference / Input / Output
UpdatePolicyEngine
Command API Reference / Input / Output
UpdateWorkloadIdentity