3단계: 클라우드 환경 생성 및 스캔 (API)
역할 ARN 찾기
Snyk API 요청 보내기
curl -X POST \
'https://api.snyk.io/rest/orgs/YOUR-ORGANIZATION-ID/cloud/environments?version=2022-12-21~beta' \
-H 'Authorization: token YOUR-API-TOKEN' \
-H 'Content-Type:application/vnd.api+json' -d '{'\n "data": {\n "attributes": {\n "kind": "aws",\n "name": "Example AWS Environment",\n "options": {\n "role_arn": "YOUR-ROLE-ARN"\n }\n },\n "type": "environment"\n }\n}'API 응답 이해
{
"jsonapi": {
"version": "1.0"
},
"data": {
"id": "3b7ccff9-8900-4e54-0000-1234abcd1234",
"type": "environment",
"attributes": {
"name": "Example AWS Environment",
"options": {
"role_arn": "arn:aws:iam::123412341234:role/snyk-cloud-role"
},
"native_id": "123412341234",
"properties": {
"account_id": "123412341234",
"account_alias": "example"
},
"kind": "aws",
"revision": 1,
"created_at": "2022-07-31T00:50:49Z",
"status": "in_progress",
"updated_at": "2022-07-31T00:50:49Z"
},
"relationships": {
"organization": {
"data": {
"id": "d70c1768-5675-0000-1234-abcd1234abcd",
"type": "organization"
},
"links": {
"related": "/orgs/d70c1768-5675-0000-1234-abcd1234abcd?version=2022-12-21~beta"
}
}
}
}
}스캔이 완료되었는지 확인
다음 단계는 무엇입니까?
Last updated