---
title: "POST /target-update-aws"
method: POST
path: "/target-update-aws"
tags: ["v2"]
---

# POST /target-update-aws

`POST /target-update-aws`

## Request body

- TargetUpdateAws
  - `access-key` string, required — AWS secret access key
  - `access-key-id` string, required — AWS access key ID
  - `delete_protection` string — Protection from accidental deletion of this object [true/false]
  - `description` string — Description of the object
  - `generate-external-id` boolean — A unique auto-generated value used in your AWS account when configuring your AWS IAM role to securely delegate access to Akeyless. Relevant only when using GW cloud ID
  - `json` boolean — Set output format to JSON
  - `keep-prev-version` string — Whether to keep previous version [true/false]. If not set, use default according to account settings
  - `key` string — The name of a key that used to encrypt the target secret value (if empty, the account default protectionKey key will be used)
  - `max-versions` string — Set the maximum number of versions, limited by the account settings defaults.
  - `name` string, required — Target name
  - `new-name` string — New target name
  - `region` string — AWS region
  - `role-arn` string — AWS IAM role identifier that Gateway will assume in your AWS account, relevant only when using external ID
  - `session-token` string — Required only for temporary security credentials retrieved using STS
  - `token` string — Authentication token (see `/auth` and `/configure`)
  - `uid-token` string — The universal identity token, Required only for universal_identity authentication
  - `use-gw-cloud-identity` boolean — Use the GW's Cloud IAM

## Response `201`

targetUpdateAwsResponse wraps response body.

- TargetUpdateOutput
  - `target_id` integer

## Other responses

- `default` — errorResponse wraps any error to return it as a JSON object with one "error" field.

---

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