Experimental
@aws-cdk/aws-cloud9-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
Owner Class
An environment owner.
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
of environment owner.
Methods
accountRoot(accountId: string): Owner // chainable@staticmethod def account_root(account_id: str) -> Ownerpublic static Owner accountRoot(String accountId)public static Owner AccountRoot(string accountId)func AccountRoot(AccountId *string) Ownerstatic#Make the Account Root User the environment owner (not recommended).
1 parameter
Parameters
accountIdaccount_idaccountIdaccountIdAccountId— the AccountId to use as the environment owner.
assumedRole(accountId: string, roleName: string): Owner // chainable@staticmethod def assumed_role(account_id: str, role_name: str) -> Ownerpublic static Owner assumedRole(String accountId, String roleName)public static Owner AssumedRole(string accountId, string roleName)func AssumedRole(AccountId *string, RoleName *string) Ownerstatic#Make an IAM assumed role the environment owner.
2 parameters
Parameters
accountIdaccount_idaccountIdaccountIdAccountId— The account id of the target account.roleNamerole_nameroleNameroleNameRoleName— The name of the assumed role.
federatedUser(accountId: string, userName: string): Owner // chainable@staticmethod def federated_user(account_id: str, user_name: str) -> Ownerpublic static Owner federatedUser(String accountId, String userName)public static Owner FederatedUser(string accountId, string userName)func FederatedUser(AccountId *string, UserName *string) Ownerstatic#Make an IAM federated user the environment owner.
2 parameters
Parameters
accountIdaccount_idaccountIdaccountIdAccountId— The AccountId of the target account.userNameuser_nameuserNameuserNameUserName— The name of the federated user.
user(user: IUser): Owner // chainable@staticmethod def user(user: IUser) -> Ownerpublic static Owner user(IUser user)public static Owner User(IUser user)func User(User IUser) Ownerstatic#Make an IAM user the environment owner.
User need to have AWSCloud9Administrator permissions
1 parameter
Parameters
useruseruseruserUser— the User object to use as the environment owner.