On July 31, 2024, Amazon Web Services (AWS) will discontinue support for creating and viewing AWS CodeStar projects. After July 31, 2024, you will no longer be able to access the AWS CodeStar console or create new projects. However, the AWS resources created by AWS CodeStar, including your source repositories, pipelines, and builds, will be unaffected by this change and will continue to function. AWS CodeStar Connections will not be impacted by this discontinuation.
If you wish to track work, develop code, and build, test, and deploy
your applications, Amazon CodeCatalyst provides a streamlined getting started
process and additional functionality to manage your software projects. Learn
more about functionality
UpdateTeamMember
Updates a team member's attributes in an AWS CodeStar project. For example, you can change a team member's role in the project, or change whether they have remote access to project resources.
Request Syntax
{
"projectId": "string
",
"projectRole": "string
",
"remoteAccessAllowed": boolean
,
"userArn": "string
"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- projectId
-
The ID of the project.
Type: String
Length Constraints: Minimum length of 2. Maximum length of 15.
Pattern:
^[a-z][a-z0-9-]+$
Required: Yes
- projectRole
-
The role assigned to the user in the project. Project roles have different levels of access. For more information, see Working with Teams in the AWS CodeStar User Guide.
Type: String
Pattern:
^(Owner|Viewer|Contributor)$
Required: No
- remoteAccessAllowed
-
Whether a team member is allowed to remotely access project resources using the SSH public key associated with the user's profile. Even if this is set to True, the user must associate a public key with their profile before the user can access resources.
Type: Boolean
Required: No
- userArn
-
The Amazon Resource Name (ARN) of the user for whom you want to change team membership attributes.
Type: String
Length Constraints: Minimum length of 32. Maximum length of 95.
Pattern:
^arn:aws:iam::\d{12}:user(?:(\u002F)|(\u002F[\u0021-\u007E]+\u002F))[\w+=,.@-]+$
Required: Yes
Response Syntax
{
"projectRole": "string",
"remoteAccessAllowed": boolean,
"userArn": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- projectRole
-
The project role granted to the user.
Type: String
Pattern:
^(Owner|Viewer|Contributor)$
- remoteAccessAllowed
-
Whether a team member is allowed to remotely access project resources using the SSH public key associated with the user's profile.
Type: Boolean
- userArn
-
The Amazon Resource Name (ARN) of the user whose team membership attributes were updated.
Type: String
Length Constraints: Minimum length of 32. Maximum length of 95.
Pattern:
^arn:aws:iam::\d{12}:user(?:(\u002F)|(\u002F[\u0021-\u007E]+\u002F))[\w+=,.@-]+$
Errors
For information about the errors that are common to all actions, see Common Errors.
- ConcurrentModificationException
-
Another modification is being made. That modification must complete before you can make your change.
HTTP Status Code: 400
- InvalidServiceRoleException
-
The service role is not valid.
HTTP Status Code: 400
- LimitExceededException
-
A resource limit has been exceeded.
HTTP Status Code: 400
- ProjectConfigurationException
-
Project configuration information is required but not specified.
HTTP Status Code: 400
- ProjectNotFoundException
-
The specified AWS CodeStar project was not found.
HTTP Status Code: 400
- TeamMemberNotFoundException
-
The specified team member was not found.
HTTP Status Code: 400
- ValidationException
-
The specified input is either not valid, or it could not be validated.
HTTP Status Code: 400
Examples
Example
This example illustrates one usage of UpdateTeamMember.
Sample Request
POST / HTTP/1.1
Host: codestar.us-east-1.amazonaws.com
Accept-Encoding: identity
Content-Length: 152
X-Amz-Target: CodeStar_20170419.UpdateTeamMember
X-Amz-Date: 20170406T035631Z
User-Agent: aws-cli/1.11.36 Python/2.7.9 Windows/7 botocore/1.4.93
Content-Type: application/x-amz-json-1.1
Authorization: AWS4-HMAC-SHA256 Credential=AIDACKCEVSQ6C2EXAMPLE/20170406/us-east-1/codestar/aws4_request, SignedHeaders=content-type;host;x-amz-date;x-amz-target, Signature=c25ddcd5EXAMPLE
{
"projectRole": "Contributor",
"projectId": "my-first-projec",
"remoteAccessAllowed": false,
"userArn": "arn:aws:iam::111111111111:user/John_Doe"
}
Sample Response
HTTP/1.1 200 OK
x-amzn-RequestId: 06343b93-EXAMPLE
Content-Type: application/x-amz-json-1.1
Content-Length: 115
Date: Thu, 06 Apr 2017 03:56:33 GMT
{
"projectRole":"Contributor",
"remoteAccessAllowed":false,
"userArn":"arn:aws:iam::111111111111:user/John_Doe"
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: