Skip to content

update_environment_membership async

update_environment_membership(
    environment_id: EnvironmentId,
    user_arn: UserArn,
    permissions: MemberPermissions,
    *,
    config_overrides: Optional[AsyncCloud9ClientConfig] = None,
) -> UpdateEnvironmentMembershipResult

Changes the settings of an existing environment member for an Cloud9 development environment.

Cloud9 is no longer available to new customers. Existing customers of Cloud9 can continue to use the service as normal. Learn more"

Parameters:

  • environment_id (EnvironmentId) –

    The ID of the environment for the environment member whose settings you want to change.

  • user_arn (UserArn) –

    The Amazon Resource Name (ARN) of the environment member whose settings you want to change.

  • permissions (MemberPermissions) –

    The replacement type of environment member permissions you want to associate with this environment member. Available values include:

    • read-only: Has read-only access to the environment.

    • read-write: Has read-write access to the environment.

Raises:

Examples:

UpdateEnvironmentMembership

>>> await client.update_environment_membership(environment_id='8d9967e2f0624182b74e7690ad69ebEX', user_arn='arn:aws:iam::123456789012:user/AnotherDemoUser', permissions='read-only')
Source code in docs_src/capo_cloud9/_services/async_cloud9.py
async def update_environment_membership(
    self,
    environment_id: "capo_cloud9.types.environment_id.EnvironmentId",
    user_arn: "capo_cloud9.types.user_arn.UserArn",
    permissions: "capo_cloud9.types.member_permissions.MemberPermissions",
    *,
    config_overrides: Optional[AsyncCloud9ClientConfig] = None,
) -> "capo_cloud9.types.update_environment_membership_result.UpdateEnvironmentMembershipResult":
    """<p>Changes the settings of an existing environment member for an Cloud9 development environment.</p> <important> <p>Cloud9 is no longer available to new customers. Existing customers of Cloud9 can continue to use the service as normal. <a href="http://aws.amazon.com/blogs/devops/how-to-migrate-from-aws-cloud9-to-aws-ide-toolkits-or-aws-cloudshell/">Learn more"</a> </p> </important>

    Args:
        environment_id: <p>The ID of the environment for the environment member whose settings you want to change.</p>
        user_arn: <p>The Amazon Resource Name (ARN) of the environment member whose settings you want to change.</p>
        permissions: <p>The replacement type of environment member permissions you want to associate with this environment member. Available values include:</p> <ul> <li> <p> <code>read-only</code>: Has read-only access to the environment.</p> </li> <li> <p> <code>read-write</code>: Has read-write access to the environment.</p> </li> </ul>

    Raises:
        capo_cloud9.errors.bad_request_exception.BadRequestException: <p>The target request is invalid.</p>
        capo_cloud9.errors.conflict_exception.ConflictException: <p>A conflict occurred.</p>
        capo_cloud9.errors.forbidden_exception.ForbiddenException: <p>An access permissions issue occurred.</p>
        capo_cloud9.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal server error occurred.</p>
        capo_cloud9.errors.limit_exceeded_exception.LimitExceededException: <p>A service limit was exceeded.</p>
        capo_cloud9.errors.not_found_exception.NotFoundException: <p>The target resource cannot be found.</p>
        capo_cloud9.errors.too_many_requests_exception.TooManyRequestsException: <p>Too many service requests were made over the given time period.</p>
        capo_cloud9.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        UpdateEnvironmentMembership

        >>> await client.update_environment_membership(environment_id='8d9967e2f0624182b74e7690ad69ebEX', user_arn='arn:aws:iam::123456789012:user/AnotherDemoUser', permissions='read-only')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloud9.types.update_environment_membership_request.UpdateEnvironmentMembershipRequest]",
    ) -> AsyncOperationResponse[
        "capo_cloud9.types.update_environment_membership_result.UpdateEnvironmentMembershipResult"
    ]:
        import capo_cloud9._operations.aws_cloud9_workspace_management_service.update_environment_membership

        (
            output,
            http_response,
        ) = await capo_cloud9._operations.aws_cloud9_workspace_management_service.update_environment_membership.async_update_environment_membership(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateEnvironmentMembership")
    )
    input_: capo_cloud9.types.update_environment_membership_request.UpdateEnvironmentMembershipRequest = {
        "environment_id": environment_id,
        "user_arn": user_arn,
        "permissions": permissions,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output