Class: AWSCDK::IAM::GroupProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
iam/group_props.rb

Overview

Properties for defining an IAM group.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(group_name: nil, managed_policies: nil, path: nil) ⇒ GroupProps

Returns a new instance of GroupProps.

Parameters:

  • group_name (String, nil) (defaults to: nil)

    A name for the IAM group.

  • managed_policies (Array<AWSCDK::IAM::IManagedPolicy>, nil) (defaults to: nil)

    A list of managed policies associated with this role.

  • path (String, nil) (defaults to: nil)

    The path to the group.



10
11
12
13
14
15
16
17
# File 'iam/group_props.rb', line 10

def initialize(group_name: nil, managed_policies: nil, path: nil)
  @group_name = group_name
  Jsii::Type.check_type(@group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "groupName") unless @group_name.nil?
  @managed_policies = managed_policies
  Jsii::Type.check_type(@managed_policies, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pYW0uSU1hbmFnZWRQb2xpY3kifSwia2luZCI6ImFycmF5In19")), "managedPolicies") unless @managed_policies.nil?
  @path = path
  Jsii::Type.check_type(@path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") unless @path.nil?
end

Instance Attribute Details

#group_nameString? (readonly)

Note:

Default: Generated by CloudFormation (recommended)

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.

Returns:

  • (String, nil)


32
33
34
# File 'iam/group_props.rb', line 32

def group_name
  @group_name
end

#managed_policiesArray<AWSCDK::IAM::IManagedPolicy>? (readonly)

Note:

Default: - No managed policies.

A list of managed policies associated with this role.

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

Returns:



40
41
42
# File 'iam/group_props.rb', line 40

def managed_policies
  @managed_policies
end

#pathString? (readonly)

Note:

Default: /

The path to the group.

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

Returns:

  • (String, nil)


49
50
51
# File 'iam/group_props.rb', line 49

def path
  @path
end

Class Method Details

.jsii_propertiesObject



51
52
53
54
55
56
57
# File 'iam/group_props.rb', line 51

def self.jsii_properties
  {
    :group_name => "groupName",
    :managed_policies => "managedPolicies",
    :path => "path",
  }
end

Instance Method Details

#to_jsiiObject



59
60
61
62
63
64
65
66
67
# File 'iam/group_props.rb', line 59

def to_jsii
  result = {}
  result.merge!({
    "groupName" => @group_name,
    "managedPolicies" => @managed_policies,
    "path" => @path,
  })
  result.compact
end