UpdateAgentActionGroup
Updates the configuration for an action group for an agent.
Request Syntax
PUT /agents/agentId
/agentversions/agentVersion
/actiongroups/actionGroupId
/ HTTP/1.1
Content-type: application/json
{
"actionGroupExecutor": { ... },
"actionGroupName": "string
",
"actionGroupState": "string
",
"apiSchema": { ... },
"description": "string
",
"functionSchema": { ... },
"parentActionGroupSignature": "string
"
}
URI Request Parameters
The request uses the following URI parameters.
- actionGroupId
-
The unique identifier of the action group.
Pattern:
^[0-9a-zA-Z]{10}$
Required: Yes
- agentId
-
The unique identifier of the agent for which to update the action group.
Pattern:
^[0-9a-zA-Z]{10}$
Required: Yes
- agentVersion
-
The unique identifier of the agent version for which to update the action group.
Length Constraints: Fixed length of 5.
Pattern:
^DRAFT$
Required: Yes
Request Body
The request accepts the following data in JSON format.
- actionGroupExecutor
-
The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action.
Type: ActionGroupExecutor object
Note: This object is a Union. Only one member of this object can be specified or returned.
Required: No
- actionGroupName
-
Specifies a new name for the action group.
Type: String
Pattern:
^([0-9a-zA-Z][_-]?){1,100}$
Required: Yes
- actionGroupState
-
Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request.
Type: String
Valid Values:
ENABLED | DISABLED
Required: No
- apiSchema
-
Contains either details about the S3 object containing the OpenAPI schema for the action group or the JSON or YAML-formatted payload defining the schema. For more information, see Action group OpenAPI schemas.
Type: APISchema object
Note: This object is a Union. Only one member of this object can be specified or returned.
Required: No
- description
-
Specifies a new name for the action group.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 200.
Required: No
- functionSchema
-
Contains details about the function schema for the action group or the JSON or YAML-formatted payload defining the schema.
Type: FunctionSchema object
Note: This object is a Union. Only one member of this object can be specified or returned.
Required: No
- parentActionGroupSignature
-
To allow your agent to request the user for additional information when trying to complete a task, set this field to
AMAZON.UserInput
. You must leave thedescription
,apiSchema
, andactionGroupExecutor
fields blank for this action group.During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an Observation reprompting the user for more information.
Type: String
Valid Values:
AMAZON.UserInput | AMAZON.CodeInterpreter
Required: No
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"agentActionGroup": {
"actionGroupExecutor": { ... },
"actionGroupId": "string",
"actionGroupName": "string",
"actionGroupState": "string",
"agentId": "string",
"agentVersion": "string",
"apiSchema": { ... },
"clientToken": "string",
"createdAt": "string",
"description": "string",
"functionSchema": { ... },
"parentActionSignature": "string",
"updatedAt": "string"
}
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- agentActionGroup
-
Contains details about the action group that was updated.
Type: AgentActionGroup object
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
The request is denied because of missing access permissions.
HTTP Status Code: 403
- ConflictException
-
There was a conflict performing an operation.
HTTP Status Code: 409
- InternalServerException
-
An internal server error occurred. Retry your request.
HTTP Status Code: 500
- ResourceNotFoundException
-
The specified resource Amazon Resource Name (ARN) was not found. Check the Amazon Resource Name (ARN) and try your request again.
HTTP Status Code: 404
- ServiceQuotaExceededException
-
The number of requests exceeds the service quota. Resubmit your request later.
HTTP Status Code: 402
- ThrottlingException
-
The number of requests exceeds the limit. Resubmit your request later.
HTTP Status Code: 429
- ValidationException
-
Input validation failed. Check your request parameters and retry the request.
HTTP Status Code: 400
Examples
Example request
This example illustrates one usage of UpdateAgentActionGroup.
PUT /agents/AGENT12345/agentversions/1/actiongroups/ACTION1234/ HTTP/1.1 Content-type: application/json { "actionGroupName": "bedrock-temp-actions", "actionGroupState": "ENABLED", "description": "Testing = latest IT Management action", "apiSchema": { "s3": { "s3BucketName": "apischema-s3", "s3ObjectKey": "it_agent_openapi.json" } }, "actionGroupExecutor": { "lambda": "arn:aws:lambda:us-west-2:123456789012:function:ItAgentLambda" } }
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: