Interface InstanceProfileAttributes

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
InstanceProfileAttributes.Jsii$Proxy

@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-04-10T22:22:28.949Z") @Stability(Stable) public interface InstanceProfileAttributes extends software.amazon.jsii.JsiiSerializable
Attributes of an Instance Profile.

Example:

 Role role = Role.Builder.create(this, "Role")
         .assumedBy(new ServicePrincipal("ec2.amazonaws.com"))
         .build();
 IInstanceProfile instanceProfile = InstanceProfile.fromInstanceProfileAttributes(this, "ImportedInstanceProfile", InstanceProfileAttributes.builder()
         .instanceProfileArn("arn:aws:iam::account-id:instance-profile/MyInstanceProfile")
         .role(role)
         .build());
 
  • Method Details

    • getInstanceProfileArn

      @Stability(Stable) @NotNull String getInstanceProfileArn()
      The ARN of the InstanceProfile.

      Format: arn::iam::invalid input: '<'account-id>:instance-profile/invalid input: '<'instance-profile-name-with-path>

    • getRole

      @Stability(Stable) @Nullable default IRole getRole()
      The role associated with the InstanceProfile.

      Default: - no role

    • builder

      @Stability(Stable) static InstanceProfileAttributes.Builder builder()
      Returns:
      a InstanceProfileAttributes.Builder of InstanceProfileAttributes