Cloud Authentication
Create a GitHub cloud auth intake mapping
Create a GitHub cloud authentication intake mapping. This endpoint entitles a matching GitHub Actions OIDC principal to request Datadog API keys.
post/api/v2/wif/github/intake_mapping
Request
- Base URLhttps://api.datadoghq.com
- Auth
- API key in header DD-API-KEY and API key in header DD-APPLICATION-KEY
- or OAuth 2Authorization code/oauth2/v1/authorizeToken URL/oauth2/v1/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"data": {
"attributes": {
"claim_matchers": {
"actor": "octocat",
"actor_id": "1234567",
"enterprise": "test_enterprise",
"enterprise_id": "42",
"environment": "production",
"event_name": "push",
"job_workflow_ref": "test_owner/test_repo/.github/workflows/jobs.yml@refs/heads/main",
"ref": "refs/heads/main",
"ref_type": "branch",
"repository": "test_owner/test_repo",
"repository_id": "123456789",
"repository_owner": "test_owner",
"repository_owner_id": "987654321",
"repository_visibility": "public",
"runner_environment": "github-hosted",
"sub": "repo:test_owner/test_repo:(ref:refs/heads/main|pull_request)",
"workflow": "CI",
"workflow_ref": "test_owner/test_repo/.github/workflows/ci.yml@refs/heads/main"
}
},
"type": "github_oidc_auth_intake_mapping"
}
}Response
Created
Example response
{
"data": {
"attributes": {
"claim_matchers": {
"actor": "octocat",
"actor_id": "1234567",
"enterprise": "test_enterprise",
"enterprise_id": "42",
"environment": "production",
"event_name": "push",
"job_workflow_ref": "test_owner/test_repo/.github/workflows/jobs.yml@refs/heads/main",
"ref": "refs/heads/main",
"ref_type": "branch",
"repository": "test_owner/test_repo",
"repository_id": "123456789",
"repository_owner": "test_owner",
"repository_owner_id": "987654321",
"repository_visibility": "public",
"runner_environment": "github-hosted",
"sub": "repo:test_owner/test_repo:(ref:refs/heads/main|pull_request)",
"workflow": "CI",
"workflow_ref": "test_owner/test_repo/.github/workflows/ci.yml@refs/heads/main"
}
},
"id": "d6d869d7-29d3-5595-bf40-57c95235cf5b",
"type": "github_oidc_auth_intake_mapping"
}
}Changes
Changes to this operation have not been checked yet.