Creates a new workload identity on this account. For managed roles using automatic provider setup, installation of the cloud resources is triggered automatically unless noInstall=true is passed.
Required permission
Account > Cloud > WorkloadIdentities > Create
Query parameters
noInstall
booleanSkip automatic installation of cloud resources after create or update for managed roles. The workload identity will be left in the unapplied/outdated state.
Request body
- {object}
name
string requiredmin length3max length100pattern^[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*$description
stringmax length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$priority
integerThe priority used to select a workload identity for each provider.min0max100spec
(multiple options: oneOf) requiredupdatedAt
stringtime of updatecreatedAt
stringtime of creation
Response body
- {object}Response object.
data
{object} requiredResult data.id
string requiredID of the workload identitymin length3max length39pattern^[a-zA-Z](-?[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)?$name
string requiredmin length3max length100pattern^[a-zA-Z0-9]+((-|\s)[a-zA-Z0-9]+)*$description
stringmax length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$priority
integerThe priority used to select a workload identity for each provider.min0max100spec
(multiple options: oneOf) requiredstate
{object}The current state of the workload identity.status
string requiredThe current install status of the workload identity.one ofunapplied, outdated, installing, updating, error, applied, deletingupdatedAt
stringtime of updateerrors
[array]Any errors encountered during installation.- string
updatedAt
stringtime of updatecreatedAt
stringtime of creation
POST /v1/workload-identities
POST /v1/teams/{teamId}/workload-identities
Example request
Request body
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"Example Workload Identity","priority":10,"spec":{"restrictions":{"projects":{"enabled":false},"tags":{"enabled":false,"matchCondition":"or"}},"providerLinkId":"string","roleMode":"managed","provider":{"type":"aws","policyDocument":{"Version":"2012-10-17","Statement":{"Effect":"Allow","Action":"string","Resource":"*"}}}}}' \
"https://api.northflank.com/v1/workload-identities"Example response
200 OK
Data about the newly created workload identity.
JSON
{
"data": {
"id": "example-workload-identity",
"name": "Example Workload Identity",
"priority": 10,
"spec": {
"restrictions": {
"projects": {
"enabled": false
},
"tags": {
"enabled": false,
"matchCondition": "or"
}
},
"providerLinkId": "string",
"roleMode": "managed",
"provider": {
"type": "aws",
"policyDocument": {
"Version": "2012-10-17",
"Statement": {
"Effect": "Allow",
"Action": "string",
"Resource": "*"
}
}
}
}
}
}