Owner

class aws_cdk.aws_cloud9_alpha.Owner(*args: Any, **kwargs)

Bases: object

(experimental) An environment owner.

Stability:

experimental

ExampleMetadata:

infused

Example:

import aws_cdk.aws_iam as iam

# vpc: ec2.Vpc

cloud9.Ec2Environment(self, "C9Env",
    vpc=vpc,
    image_id=cloud9.ImageId.AMAZON_LINUX_2,
    owner=cloud9.Owner.federated_user(Stack.of(self).account, "Admin/johndoe")
)

Attributes

owner_arn

(experimental) of environment owner.

Stability:

experimental

Static Methods

classmethod account_root(account_id)

(experimental) Make the Account Root User the environment owner (not recommended).

Parameters:

account_id (str) – the AccountId to use as the environment owner.

Stability:

experimental

Return type:

Owner

classmethod assumed_role(account_id, role_name)

(experimental) Make an IAM assumed role the environment owner.

Parameters:
  • account_id (str) – The account id of the target account.

  • role_name (str) – The name of the assumed role.

Stability:

experimental

Return type:

Owner

classmethod federated_user(account_id, user_name)

(experimental) Make an IAM federated user the environment owner.

Parameters:
  • account_id (str) – The AccountId of the target account.

  • user_name (str) – The name of the federated user.

Stability:

experimental

Return type:

Owner

classmethod user(user)

(experimental) Make an IAM user the environment owner.

User need to have AWSCloud9Administrator permissions

Parameters:

user (IUser) – the User object to use as the environment owner.

See:

https://docs.aws.amazon.com/cloud9/latest/user-guide/share-environment.html#share-environment-about

Stability:

experimental

Return type:

Owner