Modify Project Principals

Modify Project Principals
Modifies principals assigned to a project

Modifies principals assigned to a project by id.

Request
URI
PATCH
https://vcfa-10-162-161-9.vcfd.broadcom.net/project-service/api/projects/{id}/principals
COPY
Path Parameters
string
id
Required

The id of the project.

Query Parameters
boolean
validatePrincipals
Optional

If true, a limit of 20 principals is enforced. Additionally each principal is validated in the Identity provider and important rules for group email formats are enforced.

boolean
syncPrincipals
Optional
Constraints: default: true

syncPrincipals

string
apiVersion
Optional
Constraints: default: 2019-01-15

The version of the API in yyyy-MM-dd format. For versioning information refer to /project-service/api/about.


Request Body

Principals

ProjectPrincipalsAssignment of type(s) application/json
Required
{
    "modify": [
        {
            "id": "c493a95e-c4d1-4496-8595-e73902701c95:fe69d7ca-40a6-4de5-8f33-d462f4656938",
            "email": "[email protected]",
            "type": "user",
            "role": "member"
        }
    ],
    "remove": [
        {
            "id": "c493a95e-c4d1-4496-8595-e73902701c95:fe69d7ca-40a6-4de5-8f33-d462f4656938",
            "email": "[email protected]",
            "type": "user",
            "role": "member"
        }
    ]
}
array of object
modify
Optional

Principal to add or change role in project.

array of object
remove
Optional

Principal to remove from project.

Authentication
This operation uses the following authentication methods.
Responses
200

'Success' with the Project

Returns Project of type(s) */*
{
    "id": "string",
    "name": "my-name",
    "description": "my-description",
    "orgId": "string",
    "administrators": [
        {
            "email": "[email protected]",
            "type": "user"
        }
    ],
    "members": [
        {
            "email": "[email protected]",
            "type": "user"
        }
    ],
    "viewers": [
        {
            "email": "[email protected]",
            "type": "user"
        }
    ],
    "supervisors": [
        {
            "email": "[email protected]",
            "type": "user"
        }
    ],
    "users": [
        {
            "email": "[email protected]",
            "type": "user"
        }
    ],
    "auditors": [
        {
            "email": "[email protected]",
            "type": "user"
        }
    ],
    "advancedUsers": [
        {
            "email": "[email protected]",
            "type": "user"
        }
    ],
    "constraints": {
        "network": {
            "conditions": [
                {
                    "type": "TAG",
                    "enforcement": "HARD",
                    "occurrence": "MUST_OCCUR",
                    "expression": {
                        "key": "key",
                        "value": "value"
                    }
                }
            ]
        }
    },
    "properties": {
        "myproperty": "enforcement",
        "__projectPlacementPolicy": "SPREAD",
        "__namingTemplate": "my-resource-template",
        "__allowTerraformCloudzoneMapping": "true"
    },
    "cost": {
        "cost": "number",
        "costSyncTime": "2011-12-03T10:15:30Z",
        "costUnit": "USD",
        "message": "string",
        "code": "string"
    },
    "operationTimeout": 0,
    "sharedResources": false
}

400

Invalid Request - bad data

Operation doesn't return any data structure

403

Forbidden, the user lacks permissions

Operation doesn't return any data structure

404

'Not found' if no project with the provided id

Returns Project of type(s) */*
{
    "id": "string",
    "name": "my-name",
    "description": "my-description",
    "orgId": "string",
    "administrators": [
        {
            "email": "[email protected]",
            "type": "user"
        }
    ],
    "members": [
        {
            "email": "[email protected]",
            "type": "user"
        }
    ],
    "viewers": [
        {
            "email": "[email protected]",
            "type": "user"
        }
    ],
    "supervisors": [
        {
            "email": "[email protected]",
            "type": "user"
        }
    ],
    "users": [
        {
            "email": "[email protected]",
            "type": "user"
        }
    ],
    "auditors": [
        {
            "email": "[email protected]",
            "type": "user"
        }
    ],
    "advancedUsers": [
        {
            "email": "[email protected]",
            "type": "user"
        }
    ],
    "constraints": {
        "network": {
            "conditions": [
                {
                    "type": "TAG",
                    "enforcement": "HARD",
                    "occurrence": "MUST_OCCUR",
                    "expression": {
                        "key": "key",
                        "value": "value"
                    }
                }
            ]
        }
    },
    "properties": {
        "myproperty": "enforcement",
        "__projectPlacementPolicy": "SPREAD",
        "__namingTemplate": "my-resource-template",
        "__allowTerraformCloudzoneMapping": "true"
    },
    "cost": {
        "cost": "number",
        "costSyncTime": "2011-12-03T10:15:30Z",
        "costUnit": "USD",
        "message": "string",
        "code": "string"
    },
    "operationTimeout": 0,
    "sharedResources": false
}

Code Samples
COPY
                    curl -X PATCH -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{}'