Class CfnInstanceProfile

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-08T21:35:08.097Z") @Stability(Stable) public class CfnInstanceProfile extends CfnResource implements IInspectable
Creates a new instance profile. For information about instance profiles, see Using instance profiles .

For information about the number of instance profiles you can create, see IAM object quotas in the IAM User Guide .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.iam.*;
 CfnInstanceProfile cfnInstanceProfile = CfnInstanceProfile.Builder.create(this, "MyCfnInstanceProfile")
         .roles(List.of("roles"))
         // the properties below are optional
         .instanceProfileName("instanceProfileName")
         .path("path")
         .build();
 

See Also:
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnInstanceProfile

      protected CfnInstanceProfile(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnInstanceProfile

      protected CfnInstanceProfile(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnInstanceProfile

      @Stability(Stable) public CfnInstanceProfile(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnInstanceProfileProps props)
      Parameters:
      scope - Scope in which this resource is defined. This parameter is required.
      id - Construct identifier for this resource (unique in its scope). This parameter is required.
      props - Resource properties. This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector - tree inspector to collect and process attributes. This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      Returns the Amazon Resource Name (ARN) for the instance profile. For example:.

      {"Fn::GetAtt" : ["MyProfile", "Arn"] }

      This returns a value such as arn:aws:iam::1234567890:instance-profile/MyProfile-ASDNSDLKJ .

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getRoles

      @Stability(Stable) @NotNull public List<String> getRoles()
      The name of the role to associate with the instance profile.
    • setRoles

      @Stability(Stable) public void setRoles(@NotNull List<String> value)
      The name of the role to associate with the instance profile.
    • getInstanceProfileName

      @Stability(Stable) @Nullable public String getInstanceProfileName()
      The name of the instance profile to create.
    • setInstanceProfileName

      @Stability(Stable) public void setInstanceProfileName(@Nullable String value)
      The name of the instance profile to create.
    • getPath

      @Stability(Stable) @Nullable public String getPath()
      The path to the instance profile.
    • setPath

      @Stability(Stable) public void setPath(@Nullable String value)
      The path to the instance profile.