> **Experimental**
>
> `@aws-cdk/aws-cloud9-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# Owner

An environment owner.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/environment.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts#L265)

## Example

```ts
import * as iam from 'aws-cdk-lib/aws-iam';

declare const vpc: ec2.Vpc;
new cloud9.Ec2Environment(this, 'C9Env', {
  vpc,
  imageId: cloud9.ImageId.AMAZON_LINUX_2,
  owner: cloud9.Owner.federatedUser(Stack.of(this).account, "Admin/johndoe")
})
```

## Properties

- `ownerArn`: string — of environment owner.

## Methods

- `accountRoot(accountId: string): Owner // chainable` (static) — Make the Account Root User the environment owner (not recommended).

  **Parameters**

  - `accountId` — the AccountId to use as the environment owner.

- `assumedRole(accountId: string, roleName: string): Owner // chainable` (static) — Make an IAM assumed role the environment owner.

  **Parameters**

  - `accountId` — The account id of the target account.
  - `roleName` — The name of the assumed role.

- `federatedUser(accountId: string, userName: string): Owner // chainable` (static) — Make an IAM federated user the environment owner.

  **Parameters**

  - `accountId` — The AccountId of the target account.
  - `userName` — The name of the federated user.

- `user(user: IUser): Owner // chainable` (static) — Make an IAM user the environment owner.

  User need to have AWSCloud9Administrator permissions

  **Parameters**

  - `user` — the User object to use as the environment owner.
