curl --request PATCH \
--url https://api.select.dev/v2/aws-accounts/{aws_account_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"name": "<string>",
"payer_account_id": "<string>",
"s3_bucket": "<string>",
"s3_prefix": "<string>",
"region": "<string>",
"credentials": {
"access_key_id": "<string>",
"secret_access_key": "<string>"
},
"sync_enabled": true
}
'import requests
url = "https://api.select.dev/v2/aws-accounts/{aws_account_id}"
payload = {
"name": "<string>",
"payer_account_id": "<string>",
"s3_bucket": "<string>",
"s3_prefix": "<string>",
"region": "<string>",
"credentials": {
"access_key_id": "<string>",
"secret_access_key": "<string>"
},
"sync_enabled": True
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
payer_account_id: '<string>',
s3_bucket: '<string>',
s3_prefix: '<string>',
region: '<string>',
credentials: {access_key_id: '<string>', secret_access_key: '<string>'},
sync_enabled: true
})
};
fetch('https://api.select.dev/v2/aws-accounts/{aws_account_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.select.dev/v2/aws-accounts/{aws_account_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'payer_account_id' => '<string>',
's3_bucket' => '<string>',
's3_prefix' => '<string>',
'region' => '<string>',
'credentials' => [
'access_key_id' => '<string>',
'secret_access_key' => '<string>'
],
'sync_enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.select.dev/v2/aws-accounts/{aws_account_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"payer_account_id\": \"<string>\",\n \"s3_bucket\": \"<string>\",\n \"s3_prefix\": \"<string>\",\n \"region\": \"<string>\",\n \"credentials\": {\n \"access_key_id\": \"<string>\",\n \"secret_access_key\": \"<string>\"\n },\n \"sync_enabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.select.dev/v2/aws-accounts/{aws_account_id}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"payer_account_id\": \"<string>\",\n \"s3_bucket\": \"<string>\",\n \"s3_prefix\": \"<string>\",\n \"region\": \"<string>\",\n \"credentials\": {\n \"access_key_id\": \"<string>\",\n \"secret_access_key\": \"<string>\"\n },\n \"sync_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/aws-accounts/{aws_account_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"payer_account_id\": \"<string>\",\n \"s3_bucket\": \"<string>\",\n \"s3_prefix\": \"<string>\",\n \"region\": \"<string>\",\n \"credentials\": {\n \"access_key_id\": \"<string>\",\n \"secret_access_key\": \"<string>\"\n },\n \"sync_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"etag": "<string>",
"name": "<string>",
"connection_id": "<string>",
"payer_account_id": "<string>",
"s3_bucket": "<string>",
"region": "<string>",
"sync_enabled": true,
"create_time": "<string>",
"update_time": "<string>",
"s3_prefix": "<string>",
"added_by_email": "<string>",
"last_successful_sync_time": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Update an AWS account
curl --request PATCH \
--url https://api.select.dev/v2/aws-accounts/{aws_account_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"name": "<string>",
"payer_account_id": "<string>",
"s3_bucket": "<string>",
"s3_prefix": "<string>",
"region": "<string>",
"credentials": {
"access_key_id": "<string>",
"secret_access_key": "<string>"
},
"sync_enabled": true
}
'import requests
url = "https://api.select.dev/v2/aws-accounts/{aws_account_id}"
payload = {
"name": "<string>",
"payer_account_id": "<string>",
"s3_bucket": "<string>",
"s3_prefix": "<string>",
"region": "<string>",
"credentials": {
"access_key_id": "<string>",
"secret_access_key": "<string>"
},
"sync_enabled": True
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
payer_account_id: '<string>',
s3_bucket: '<string>',
s3_prefix: '<string>',
region: '<string>',
credentials: {access_key_id: '<string>', secret_access_key: '<string>'},
sync_enabled: true
})
};
fetch('https://api.select.dev/v2/aws-accounts/{aws_account_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.select.dev/v2/aws-accounts/{aws_account_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'payer_account_id' => '<string>',
's3_bucket' => '<string>',
's3_prefix' => '<string>',
'region' => '<string>',
'credentials' => [
'access_key_id' => '<string>',
'secret_access_key' => '<string>'
],
'sync_enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.select.dev/v2/aws-accounts/{aws_account_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"payer_account_id\": \"<string>\",\n \"s3_bucket\": \"<string>\",\n \"s3_prefix\": \"<string>\",\n \"region\": \"<string>\",\n \"credentials\": {\n \"access_key_id\": \"<string>\",\n \"secret_access_key\": \"<string>\"\n },\n \"sync_enabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.select.dev/v2/aws-accounts/{aws_account_id}")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"payer_account_id\": \"<string>\",\n \"s3_bucket\": \"<string>\",\n \"s3_prefix\": \"<string>\",\n \"region\": \"<string>\",\n \"credentials\": {\n \"access_key_id\": \"<string>\",\n \"secret_access_key\": \"<string>\"\n },\n \"sync_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/aws-accounts/{aws_account_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"payer_account_id\": \"<string>\",\n \"s3_bucket\": \"<string>\",\n \"s3_prefix\": \"<string>\",\n \"region\": \"<string>\",\n \"credentials\": {\n \"access_key_id\": \"<string>\",\n \"secret_access_key\": \"<string>\"\n },\n \"sync_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"etag": "<string>",
"name": "<string>",
"connection_id": "<string>",
"payer_account_id": "<string>",
"s3_bucket": "<string>",
"region": "<string>",
"sync_enabled": true,
"create_time": "<string>",
"update_time": "<string>",
"s3_prefix": "<string>",
"added_by_email": "<string>",
"last_successful_sync_time": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Authorizations
Organization API key (sl_…).
Headers
The organization ID the request is scoped to.
Path Parameters
Body
Changes to apply to an AWS payer account.
A JSON merge patch: omit a field to leave it unchanged. Only s3_prefix may
be set to null, which moves SELECT to reading the root of the bucket. Every
other field is optional here only so it can be omitted; an explicit null
on one of them is rejected rather than silently ignored, since none of them
has a legal cleared state — an account with no name, no payer id, no bucket,
no region or no credentials cannot ingest anything. Supplying credentials
replaces the stored key pair.
Display name for the account, as shown throughout SELECT.
The 12-digit AWS account id of the payer account SELECT reads spend for.
^\d{12}$The S3 bucket AWS delivers this payer account's Cost and Usage Report to.
1Path within the bucket that the report is delivered under. Null when the report is delivered at the root of the bucket.
The AWS region the bucket is in, such as us-east-1. SELECT reads the bucket through this region's S3 endpoint.
^[a-z][a-z0-9-]+-\d+$Replacement IAM credentials. Omit to keep the stored ones. SELECT verifies them against the bucket before they are saved.
Show child attributes
Show child attributes
Whether SELECT is currently syncing data for this account.
Response
Successful Response
A connection to one AWS payer account.
The unique identifier of the account.
Opaque strong ETag for this account's configuration. Matches the ETag response header, and is what If-Match requires on a write. It changes whenever a configurable field on the account changes.
Display name for the account, as shown throughout SELECT.
Identifier of the underlying connection, which SELECT reports sync state and connection alerts against.
The 12-digit AWS account id of the payer account SELECT reads spend for.
The S3 bucket AWS delivers this payer account's Cost and Usage Report to.
The AWS region the bucket is in, such as us-east-1. SELECT reads the bucket through this region's S3 endpoint.
Whether SELECT is currently syncing data for this account.
When the account was added.
When the account was last changed.
Path within the bucket that the report is delivered under. Null when the report is delivered at the root of the bucket.
Email address of the person who added the account. Null when it was not added by a person.
When SELECT last completed a sync for this account. Null before the first one succeeds.

