software.amazon.awscdk.services.cloud9.alpha.Owner Maven / Gradle / Ivy
Show all versions of cloud9-alpha Show documentation
package software.amazon.awscdk.services.cloud9.alpha;
/**
* (experimental) An environment owner.
*
* Example:
*
*
* import software.amazon.awscdk.services.iam.*;
* Vpc vpc;
* Ec2Environment.Builder.create(this, "C9Env")
* .vpc(vpc)
* .imageId(ImageId.AMAZON_LINUX_2)
* .owner(Owner.federatedUser(Stack.of(this).getAccount(), "Admin/johndoe"))
* .build();
*
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-24T10:56:41.903Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.cloud9.alpha.$Module.class, fqn = "@aws-cdk/aws-cloud9-alpha.Owner")
public class Owner extends software.amazon.jsii.JsiiObject {
protected Owner(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected Owner(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* (experimental) Make the Account Root User the environment owner (not recommended).
*
* @param accountId the AccountId to use as the environment owner. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloud9.alpha.Owner accountRoot(final @org.jetbrains.annotations.NotNull java.lang.String accountId) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.cloud9.alpha.Owner.class, "accountRoot", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloud9.alpha.Owner.class), new Object[] { java.util.Objects.requireNonNull(accountId, "accountId is required") });
}
/**
* (experimental) Make an IAM assumed role the environment owner.
*
* @param accountId The account id of the target account. This parameter is required.
* @param roleName The name of the assumed role. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloud9.alpha.Owner assumedRole(final @org.jetbrains.annotations.NotNull java.lang.String accountId, final @org.jetbrains.annotations.NotNull java.lang.String roleName) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.cloud9.alpha.Owner.class, "assumedRole", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloud9.alpha.Owner.class), new Object[] { java.util.Objects.requireNonNull(accountId, "accountId is required"), java.util.Objects.requireNonNull(roleName, "roleName is required") });
}
/**
* (experimental) Make an IAM federated user the environment owner.
*
* @param accountId The AccountId of the target account. This parameter is required.
* @param userName The name of the federated user. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloud9.alpha.Owner federatedUser(final @org.jetbrains.annotations.NotNull java.lang.String accountId, final @org.jetbrains.annotations.NotNull java.lang.String userName) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.cloud9.alpha.Owner.class, "federatedUser", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloud9.alpha.Owner.class), new Object[] { java.util.Objects.requireNonNull(accountId, "accountId is required"), java.util.Objects.requireNonNull(userName, "userName is required") });
}
/**
* (experimental) Make an IAM user the environment owner.
*
* User need to have AWSCloud9Administrator permissions
*
* @see https://docs.aws.amazon.com/cloud9/latest/user-guide/share-environment.html#share-environment-about
* @param user the User object to use as the environment owner. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloud9.alpha.Owner user(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.iam.IUser user) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(software.amazon.awscdk.services.cloud9.alpha.Owner.class, "user", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloud9.alpha.Owner.class), new Object[] { java.util.Objects.requireNonNull(user, "user is required") });
}
/**
* (experimental) of environment owner.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public @org.jetbrains.annotations.NotNull java.lang.String getOwnerArn() {
return software.amazon.jsii.Kernel.get(this, "ownerArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
}