GroupProps Struct
Properties for defining an IAM group.
| Source | aws-iam/lib/group.ts |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_iam as iam } from 'aws-cdk-lib';
declare const managedPolicy: iam.ManagedPolicy;
const groupProps: iam.GroupProps = {
groupName: 'groupName',
managedPolicies: [managedPolicy],
path: 'path',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_iam as iam
# managed_policy: iam.ManagedPolicy
group_props = iam.GroupProps(
group_name="groupName",
managed_policies=[managed_policy],
path="path"
)
java
// 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.*;
ManagedPolicy managedPolicy;
GroupProps groupProps = GroupProps.builder()
.groupName("groupName")
.managedPolicies(List.of(managedPolicy))
.path("path")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.IAM;
ManagedPolicy managedPolicy;
var groupProps = new GroupProps {
GroupName = "groupName",
ManagedPolicies = new [] { managedPolicy },
Path = "path"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var managedPolicy ManagedPolicy
groupProps := &GroupProps{
GroupName: jsii.String("groupName"),
ManagedPolicies: []IManagedPolicy{
managedPolicy,
},
Path: jsii.String("path"),
}
Properties
groupNameoptionalstringgroup_nameoptionalstrgroupNameoptionalStringGroupNameoptionalstringGroupNameoptional*string #A name for the IAM group.
Default: Generated by CloudFormation (recommended)
notes
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.
managedPoliciesoptionalIManagedPolicy[]managed_policiesoptionaltyping.List[IManagedPolicy]managedPoliciesoptionalList<IManagedPolicy>ManagedPoliciesoptionalIManagedPolicy[]ManagedPoliciesoptional*[]IManagedPolicy #A list of managed policies associated with this role.
Default: No managed policies.
You can add managed policies later using addManagedPolicy(ManagedPolicy.fromAwsManagedPolicyName(policyName)).
The path to the group.
For more information about paths, see IAM Identifiers in the IAM User Guide.