---
title: "POST /UpdateAgentSpace"
method: POST
path: "/UpdateAgentSpace"
---

# POST /UpdateAgentSpace

`POST /UpdateAgentSpace`

Updates the configuration of an existing agent space, including its name, description, AWS resources, target domains, and code review settings.

## Request body

- object
  - `agentSpaceId` string, required — Unique identifier of the agent space.
  - `name` string — Name of an agent space.
  - `description` string — The updated description of the agent space.
  - `awsResources` object — The AWS resources associated with an agent space, including VPCs, log groups, S3 buckets, secrets, Lambda functions, and IAM roles.
    - `vpcs` VpcConfig[] — The VPC configurations associated with the agent space.
      - `vpcArn` string — The Amazon Resource Name (ARN) of the VPC.
      - `securityGroupArns` SecurityGroupArn[] — The Amazon Resource Names (ARNs) of the security groups for the VPC configuration.
      - `subnetArns` SubnetArn[] — The Amazon Resource Names (ARNs) of the subnets for the VPC configuration.
    - `logGroups` LogGroupArn[] — The Amazon Resource Names (ARNs) of the CloudWatch log groups associated with the agent space.
    - `s3Buckets` S3BucketArn[] — The Amazon Resource Names (ARNs) of the S3 buckets associated with the agent space.
    - `secretArns` SecretArn[] — The Amazon Resource Names (ARNs) of the Secrets Manager secrets associated with the agent space.
    - `lambdaFunctionArns` LambdaFunctionArn[] — The Amazon Resource Names (ARNs) of the Lambda functions associated with the agent space.
    - `iamRoles` ServiceRole[] — The IAM roles associated with the agent space.
  - `targetDomainIds` String[] — List of target domain IDs.
  - `codeReviewSettings` object — The code review settings for an agent space, controlling which types of scanning are enabled.
    - `controlsScanning` boolean — Indicates whether controls scanning is enabled for code reviews.
    - `generalPurposeScanning` boolean — Indicates whether general-purpose scanning is enabled for code reviews.

## Response `200`

Success

- UpdateAgentSpaceOutput — Output for the UpdateAgentSpace operation.
  - `agentSpaceId` string, required — The unique identifier of the updated agent space.
  - `name` string, required — The name of the agent space.
  - `description` string — The description of the agent space.
  - `awsResources` object — The AWS resources associated with the agent space.
    - `vpcs` VpcConfig[] — The VPC configurations associated with the agent space.
      - `vpcArn` string — The Amazon Resource Name (ARN) of the VPC.
      - `securityGroupArns` SecurityGroupArn[] — The Amazon Resource Names (ARNs) of the security groups for the VPC configuration.
      - `subnetArns` SubnetArn[] — The Amazon Resource Names (ARNs) of the subnets for the VPC configuration.
    - `logGroups` LogGroupArn[] — The Amazon Resource Names (ARNs) of the CloudWatch log groups associated with the agent space.
    - `s3Buckets` S3BucketArn[] — The Amazon Resource Names (ARNs) of the S3 buckets associated with the agent space.
    - `secretArns` SecretArn[] — The Amazon Resource Names (ARNs) of the Secrets Manager secrets associated with the agent space.
    - `lambdaFunctionArns` LambdaFunctionArn[] — The Amazon Resource Names (ARNs) of the Lambda functions associated with the agent space.
    - `iamRoles` ServiceRole[] — The IAM roles associated with the agent space.
  - `targetDomainIds` String[] — The list of target domain identifiers associated with the agent space.
  - `codeReviewSettings` object — The code review settings for the agent space.
    - `controlsScanning` boolean, required — Indicates whether controls scanning is enabled for code reviews.
    - `generalPurposeScanning` boolean, required — Indicates whether general-purpose scanning is enabled for code reviews.
  - `createdAt` string, date-time — The date and time the agent space was created, in UTC format.
  - `updatedAt` string, date-time — The date and time the agent space was last updated, in UTC format.

---

[API](https://skmtc.net/aws/apis/securityagent.md) · [All operations](https://skmtc.net/aws/apis/securityagent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/securityagent/versions/cad56717d636/schema)
