Class Group.Builder

java.lang.Object
software.amazon.awscdk.services.iam.Group.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<Group>
Enclosing class:
Group

@Stability(Stable) public static final class Group.Builder extends Object implements software.amazon.jsii.Builder<Group>
A fluent builder for Group.
  • Method Details

    • create

      @Stability(Stable) public static Group.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of Group.Builder.
    • groupName

      @Stability(Stable) public Group.Builder groupName(String groupName)
      A name for the IAM group.

      For valid values, see the GroupName parameter for the CreateGroup action in the IAM API Reference. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the group name.

      If you specify a name, you must specify the CAPABILITY_NAMED_IAM value to acknowledge your template's capabilities. For more information, see Acknowledging IAM Resources in AWS CloudFormation Templates.

      Default: Generated by CloudFormation (recommended)

      Parameters:
      groupName - A name for the IAM group. This parameter is required.
      Returns:
      this
    • managedPolicies

      @Stability(Stable) public Group.Builder managedPolicies(List<? extends IManagedPolicy> managedPolicies)
      A list of managed policies associated with this role.

      You can add managed policies later using addManagedPolicy(ManagedPolicy.fromAwsManagedPolicyName(policyName)).

      Default: - No managed policies.

      Parameters:
      managedPolicies - A list of managed policies associated with this role. This parameter is required.
      Returns:
      this
    • path

      @Stability(Stable) public Group.Builder path(String path)
      The path to the group.

      For more information about paths, see IAM Identifiers in the IAM User Guide.

      Default: /

      Parameters:
      path - The path to the group. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public Group build()
      Specified by:
      build in interface software.amazon.jsii.Builder<Group>
      Returns:
      a newly built instance of Group.