class Owner
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Cloud9.Alpha.Owner |
Go | github.com/aws/aws-cdk-go/awscdkcloud9alpha/v2#Owner |
Java | software.amazon.awscdk.services.cloud9.alpha.Owner |
Python | aws_cdk.aws_cloud9_alpha.Owner |
TypeScript (source) | @aws-cdk/aws-cloud9-alpha ยป Owner |
An environment owner.
Example
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
| Name | Type | Description |
|---|---|---|
| owner | string | of environment owner. |
ownerArn
Type:
string
of environment owner.
Methods
| Name | Description |
|---|---|
| static account | Make the Account Root User the environment owner (not recommended). |
| static assumed | Make an IAM assumed role the environment owner. |
| static federated | Make an IAM federated user the environment owner. |
| static user(user) | Make an IAM user the environment owner. |
static accountRoot(accountId)
public static accountRoot(accountId: string): Owner
Parameters
- accountId
stringโ the AccountId to use as the environment owner.
Returns
Make the Account Root User the environment owner (not recommended).
static assumedRole(accountId, roleName)
public static assumedRole(accountId: string, roleName: string): Owner
Parameters
- accountId
stringโ The account id of the target account. - roleName
stringโ The name of the assumed role.
Returns
Make an IAM assumed role the environment owner.
static federatedUser(accountId, userName)
public static federatedUser(accountId: string, userName: string): Owner
Parameters
- accountId
stringโ The AccountId of the target account. - userName
stringโ The name of the federated user.
Returns
Make an IAM federated user the environment owner.
static user(user)
public static user(user: IUser): Owner
Parameters
- user
IUserโ the User object to use as the environment owner.
Returns
Make an IAM user the environment owner.
User need to have AWSCloud9Administrator permissions

.NET
Go
Java
Python
TypeScript (