Update
curl --request PATCH \
--url https://{region}.api.plerion.com/v1/tenant/asset-groups/{assetGroupId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "string",
"rules": [
[
{
"type": "integration",
"value": [
"8f3be88c-0f3d-4ec0-a4ab-2699c993fbff"
]
},
{
"type": "AWSResourceGroup",
"value": [
"f4e967fd-1475-4d11-901c-89e1df5e5784"
]
},
{
"type": "region",
"value": [
"ap-south-1",
"us-east-1"
]
},
{
"type": "resourceType",
"value": [
"AWS::Lambda::Function",
"AWS::S3::Bucket"
]
},
{
"type": "tag",
"key": "stage",
"operator": "equals",
"value": "dev"
},
{
"type": "tag",
"key": "stage",
"operator": "contains",
"value": "qa"
},
{
"type": "resourceName",
"value": "foundation",
"operator": "endsWith"
},
{
"type": "resourceName",
"value": "dev",
"operator": "startsWith"
}
]
]
}
'import requests
url = "https://{region}.api.plerion.com/v1/tenant/asset-groups/{assetGroupId}"
payload = {
"name": "string",
"rules": [[
{
"type": "integration",
"value": ["8f3be88c-0f3d-4ec0-a4ab-2699c993fbff"]
},
{
"type": "AWSResourceGroup",
"value": ["f4e967fd-1475-4d11-901c-89e1df5e5784"]
},
{
"type": "region",
"value": ["ap-south-1", "us-east-1"]
},
{
"type": "resourceType",
"value": ["AWS::Lambda::Function", "AWS::S3::Bucket"]
},
{
"type": "tag",
"key": "stage",
"operator": "equals",
"value": "dev"
},
{
"type": "tag",
"key": "stage",
"operator": "contains",
"value": "qa"
},
{
"type": "resourceName",
"value": "foundation",
"operator": "endsWith"
},
{
"type": "resourceName",
"value": "dev",
"operator": "startsWith"
}
]]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'string',
rules: [
[
{type: 'integration', value: ['8f3be88c-0f3d-4ec0-a4ab-2699c993fbff']},
{type: 'AWSResourceGroup', value: ['f4e967fd-1475-4d11-901c-89e1df5e5784']},
{type: 'region', value: ['ap-south-1', 'us-east-1']},
{type: 'resourceType', value: ['AWS::Lambda::Function', 'AWS::S3::Bucket']},
{type: 'tag', key: 'stage', operator: 'equals', value: 'dev'},
{type: 'tag', key: 'stage', operator: 'contains', value: 'qa'},
{type: 'resourceName', value: 'foundation', operator: 'endsWith'},
{type: 'resourceName', value: 'dev', operator: 'startsWith'}
]
]
})
};
fetch('https://{region}.api.plerion.com/v1/tenant/asset-groups/{assetGroupId}', 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://{region}.api.plerion.com/v1/tenant/asset-groups/{assetGroupId}",
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',
'rules' => [
[
[
'type' => 'integration',
'value' => [
'8f3be88c-0f3d-4ec0-a4ab-2699c993fbff'
]
],
[
'type' => 'AWSResourceGroup',
'value' => [
'f4e967fd-1475-4d11-901c-89e1df5e5784'
]
],
[
'type' => 'region',
'value' => [
'ap-south-1',
'us-east-1'
]
],
[
'type' => 'resourceType',
'value' => [
'AWS::Lambda::Function',
'AWS::S3::Bucket'
]
],
[
'type' => 'tag',
'key' => 'stage',
'operator' => 'equals',
'value' => 'dev'
],
[
'type' => 'tag',
'key' => 'stage',
'operator' => 'contains',
'value' => 'qa'
],
[
'type' => 'resourceName',
'value' => 'foundation',
'operator' => 'endsWith'
],
[
'type' => 'resourceName',
'value' => 'dev',
'operator' => 'startsWith'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{region}.api.plerion.com/v1/tenant/asset-groups/{assetGroupId}"
payload := strings.NewReader("{\n \"name\": \"string\",\n \"rules\": [\n [\n {\n \"type\": \"integration\",\n \"value\": [\n \"8f3be88c-0f3d-4ec0-a4ab-2699c993fbff\"\n ]\n },\n {\n \"type\": \"AWSResourceGroup\",\n \"value\": [\n \"f4e967fd-1475-4d11-901c-89e1df5e5784\"\n ]\n },\n {\n \"type\": \"region\",\n \"value\": [\n \"ap-south-1\",\n \"us-east-1\"\n ]\n },\n {\n \"type\": \"resourceType\",\n \"value\": [\n \"AWS::Lambda::Function\",\n \"AWS::S3::Bucket\"\n ]\n },\n {\n \"type\": \"tag\",\n \"key\": \"stage\",\n \"operator\": \"equals\",\n \"value\": \"dev\"\n },\n {\n \"type\": \"tag\",\n \"key\": \"stage\",\n \"operator\": \"contains\",\n \"value\": \"qa\"\n },\n {\n \"type\": \"resourceName\",\n \"value\": \"foundation\",\n \"operator\": \"endsWith\"\n },\n {\n \"type\": \"resourceName\",\n \"value\": \"dev\",\n \"operator\": \"startsWith\"\n }\n ]\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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://{region}.api.plerion.com/v1/tenant/asset-groups/{assetGroupId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"string\",\n \"rules\": [\n [\n {\n \"type\": \"integration\",\n \"value\": [\n \"8f3be88c-0f3d-4ec0-a4ab-2699c993fbff\"\n ]\n },\n {\n \"type\": \"AWSResourceGroup\",\n \"value\": [\n \"f4e967fd-1475-4d11-901c-89e1df5e5784\"\n ]\n },\n {\n \"type\": \"region\",\n \"value\": [\n \"ap-south-1\",\n \"us-east-1\"\n ]\n },\n {\n \"type\": \"resourceType\",\n \"value\": [\n \"AWS::Lambda::Function\",\n \"AWS::S3::Bucket\"\n ]\n },\n {\n \"type\": \"tag\",\n \"key\": \"stage\",\n \"operator\": \"equals\",\n \"value\": \"dev\"\n },\n {\n \"type\": \"tag\",\n \"key\": \"stage\",\n \"operator\": \"contains\",\n \"value\": \"qa\"\n },\n {\n \"type\": \"resourceName\",\n \"value\": \"foundation\",\n \"operator\": \"endsWith\"\n },\n {\n \"type\": \"resourceName\",\n \"value\": \"dev\",\n \"operator\": \"startsWith\"\n }\n ]\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/asset-groups/{assetGroupId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"string\",\n \"rules\": [\n [\n {\n \"type\": \"integration\",\n \"value\": [\n \"8f3be88c-0f3d-4ec0-a4ab-2699c993fbff\"\n ]\n },\n {\n \"type\": \"AWSResourceGroup\",\n \"value\": [\n \"f4e967fd-1475-4d11-901c-89e1df5e5784\"\n ]\n },\n {\n \"type\": \"region\",\n \"value\": [\n \"ap-south-1\",\n \"us-east-1\"\n ]\n },\n {\n \"type\": \"resourceType\",\n \"value\": [\n \"AWS::Lambda::Function\",\n \"AWS::S3::Bucket\"\n ]\n },\n {\n \"type\": \"tag\",\n \"key\": \"stage\",\n \"operator\": \"equals\",\n \"value\": \"dev\"\n },\n {\n \"type\": \"tag\",\n \"key\": \"stage\",\n \"operator\": \"contains\",\n \"value\": \"qa\"\n },\n {\n \"type\": \"resourceName\",\n \"value\": \"foundation\",\n \"operator\": \"endsWith\"\n },\n {\n \"type\": \"resourceName\",\n \"value\": \"dev\",\n \"operator\": \"startsWith\"\n }\n ]\n ]\n}"
response = http.request(request)
puts response.read_body{
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"message": "Internal server error"
}Update specific asset group in a tenant
Update a specific asset group by its ID within a tenant. This endpoint allows you to update the name and rules of a particular asset group.
PATCH
/
v1
/
tenant
/
asset-groups
/
{assetGroupId}
Update
curl --request PATCH \
--url https://{region}.api.plerion.com/v1/tenant/asset-groups/{assetGroupId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "string",
"rules": [
[
{
"type": "integration",
"value": [
"8f3be88c-0f3d-4ec0-a4ab-2699c993fbff"
]
},
{
"type": "AWSResourceGroup",
"value": [
"f4e967fd-1475-4d11-901c-89e1df5e5784"
]
},
{
"type": "region",
"value": [
"ap-south-1",
"us-east-1"
]
},
{
"type": "resourceType",
"value": [
"AWS::Lambda::Function",
"AWS::S3::Bucket"
]
},
{
"type": "tag",
"key": "stage",
"operator": "equals",
"value": "dev"
},
{
"type": "tag",
"key": "stage",
"operator": "contains",
"value": "qa"
},
{
"type": "resourceName",
"value": "foundation",
"operator": "endsWith"
},
{
"type": "resourceName",
"value": "dev",
"operator": "startsWith"
}
]
]
}
'import requests
url = "https://{region}.api.plerion.com/v1/tenant/asset-groups/{assetGroupId}"
payload = {
"name": "string",
"rules": [[
{
"type": "integration",
"value": ["8f3be88c-0f3d-4ec0-a4ab-2699c993fbff"]
},
{
"type": "AWSResourceGroup",
"value": ["f4e967fd-1475-4d11-901c-89e1df5e5784"]
},
{
"type": "region",
"value": ["ap-south-1", "us-east-1"]
},
{
"type": "resourceType",
"value": ["AWS::Lambda::Function", "AWS::S3::Bucket"]
},
{
"type": "tag",
"key": "stage",
"operator": "equals",
"value": "dev"
},
{
"type": "tag",
"key": "stage",
"operator": "contains",
"value": "qa"
},
{
"type": "resourceName",
"value": "foundation",
"operator": "endsWith"
},
{
"type": "resourceName",
"value": "dev",
"operator": "startsWith"
}
]]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'string',
rules: [
[
{type: 'integration', value: ['8f3be88c-0f3d-4ec0-a4ab-2699c993fbff']},
{type: 'AWSResourceGroup', value: ['f4e967fd-1475-4d11-901c-89e1df5e5784']},
{type: 'region', value: ['ap-south-1', 'us-east-1']},
{type: 'resourceType', value: ['AWS::Lambda::Function', 'AWS::S3::Bucket']},
{type: 'tag', key: 'stage', operator: 'equals', value: 'dev'},
{type: 'tag', key: 'stage', operator: 'contains', value: 'qa'},
{type: 'resourceName', value: 'foundation', operator: 'endsWith'},
{type: 'resourceName', value: 'dev', operator: 'startsWith'}
]
]
})
};
fetch('https://{region}.api.plerion.com/v1/tenant/asset-groups/{assetGroupId}', 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://{region}.api.plerion.com/v1/tenant/asset-groups/{assetGroupId}",
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',
'rules' => [
[
[
'type' => 'integration',
'value' => [
'8f3be88c-0f3d-4ec0-a4ab-2699c993fbff'
]
],
[
'type' => 'AWSResourceGroup',
'value' => [
'f4e967fd-1475-4d11-901c-89e1df5e5784'
]
],
[
'type' => 'region',
'value' => [
'ap-south-1',
'us-east-1'
]
],
[
'type' => 'resourceType',
'value' => [
'AWS::Lambda::Function',
'AWS::S3::Bucket'
]
],
[
'type' => 'tag',
'key' => 'stage',
'operator' => 'equals',
'value' => 'dev'
],
[
'type' => 'tag',
'key' => 'stage',
'operator' => 'contains',
'value' => 'qa'
],
[
'type' => 'resourceName',
'value' => 'foundation',
'operator' => 'endsWith'
],
[
'type' => 'resourceName',
'value' => 'dev',
'operator' => 'startsWith'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://{region}.api.plerion.com/v1/tenant/asset-groups/{assetGroupId}"
payload := strings.NewReader("{\n \"name\": \"string\",\n \"rules\": [\n [\n {\n \"type\": \"integration\",\n \"value\": [\n \"8f3be88c-0f3d-4ec0-a4ab-2699c993fbff\"\n ]\n },\n {\n \"type\": \"AWSResourceGroup\",\n \"value\": [\n \"f4e967fd-1475-4d11-901c-89e1df5e5784\"\n ]\n },\n {\n \"type\": \"region\",\n \"value\": [\n \"ap-south-1\",\n \"us-east-1\"\n ]\n },\n {\n \"type\": \"resourceType\",\n \"value\": [\n \"AWS::Lambda::Function\",\n \"AWS::S3::Bucket\"\n ]\n },\n {\n \"type\": \"tag\",\n \"key\": \"stage\",\n \"operator\": \"equals\",\n \"value\": \"dev\"\n },\n {\n \"type\": \"tag\",\n \"key\": \"stage\",\n \"operator\": \"contains\",\n \"value\": \"qa\"\n },\n {\n \"type\": \"resourceName\",\n \"value\": \"foundation\",\n \"operator\": \"endsWith\"\n },\n {\n \"type\": \"resourceName\",\n \"value\": \"dev\",\n \"operator\": \"startsWith\"\n }\n ]\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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://{region}.api.plerion.com/v1/tenant/asset-groups/{assetGroupId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"string\",\n \"rules\": [\n [\n {\n \"type\": \"integration\",\n \"value\": [\n \"8f3be88c-0f3d-4ec0-a4ab-2699c993fbff\"\n ]\n },\n {\n \"type\": \"AWSResourceGroup\",\n \"value\": [\n \"f4e967fd-1475-4d11-901c-89e1df5e5784\"\n ]\n },\n {\n \"type\": \"region\",\n \"value\": [\n \"ap-south-1\",\n \"us-east-1\"\n ]\n },\n {\n \"type\": \"resourceType\",\n \"value\": [\n \"AWS::Lambda::Function\",\n \"AWS::S3::Bucket\"\n ]\n },\n {\n \"type\": \"tag\",\n \"key\": \"stage\",\n \"operator\": \"equals\",\n \"value\": \"dev\"\n },\n {\n \"type\": \"tag\",\n \"key\": \"stage\",\n \"operator\": \"contains\",\n \"value\": \"qa\"\n },\n {\n \"type\": \"resourceName\",\n \"value\": \"foundation\",\n \"operator\": \"endsWith\"\n },\n {\n \"type\": \"resourceName\",\n \"value\": \"dev\",\n \"operator\": \"startsWith\"\n }\n ]\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{region}.api.plerion.com/v1/tenant/asset-groups/{assetGroupId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"string\",\n \"rules\": [\n [\n {\n \"type\": \"integration\",\n \"value\": [\n \"8f3be88c-0f3d-4ec0-a4ab-2699c993fbff\"\n ]\n },\n {\n \"type\": \"AWSResourceGroup\",\n \"value\": [\n \"f4e967fd-1475-4d11-901c-89e1df5e5784\"\n ]\n },\n {\n \"type\": \"region\",\n \"value\": [\n \"ap-south-1\",\n \"us-east-1\"\n ]\n },\n {\n \"type\": \"resourceType\",\n \"value\": [\n \"AWS::Lambda::Function\",\n \"AWS::S3::Bucket\"\n ]\n },\n {\n \"type\": \"tag\",\n \"key\": \"stage\",\n \"operator\": \"equals\",\n \"value\": \"dev\"\n },\n {\n \"type\": \"tag\",\n \"key\": \"stage\",\n \"operator\": \"contains\",\n \"value\": \"qa\"\n },\n {\n \"type\": \"resourceName\",\n \"value\": \"foundation\",\n \"operator\": \"endsWith\"\n },\n {\n \"type\": \"resourceName\",\n \"value\": \"dev\",\n \"operator\": \"startsWith\"\n }\n ]\n ]\n}"
response = http.request(request)
puts response.read_body{
"errors": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>"
}
]
}{
"message": "Internal server error"
}Authorizations
Bearer API Key. For example, "Bearer {Tenant API Key}"
Headers
Bearer API Key. For example, "Bearer {Tenant API Key}"
application/json
Path Parameters
Response
Success
Was this page helpful?
⌘I