Interface InstanceProfileAttributes

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

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-06T14:43:20.117Z") @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