class AwsAuth (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EKS.Legacy.AwsAuth |
Java | software.amazon.awscdk.services.eks.legacy.AwsAuth |
Python | aws_cdk.aws_eks_legacy.AwsAuth |
TypeScript (source) | @aws-cdk/aws-eks-legacy » AwsAuth |
⚠️ Deprecated: undefined
Implements
IConstruct
, IConstruct
, IDependable
Manages mapping between IAM users and roles to Kubernetes RBAC configuration.
See also: https://docs.aws.amazon.com/en_us/eks/latest/userguide/add-user-role.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as eks_legacy from '@aws-cdk/aws-eks-legacy';
declare const cluster: eks_legacy.Cluster;
const awsAuth = new eks_legacy.AwsAuth(this, 'MyAwsAuth', {
cluster: cluster,
});
Initializer
new AwsAuth(scope: Construct, id: string, props: AwsAuthProps)
⚠️ Deprecated: undefined
Parameters
- scope
Construct
- id
string
- props
Aws
Auth Props
Construct Props
Name | Type | Description |
---|---|---|
cluster | Cluster | The EKS cluster to apply this configuration to. |
cluster
⚠️ Deprecated: undefined
Type:
Cluster
The EKS cluster to apply this configuration to.
[disable-awslint:ref-via-interface]
Properties
Name | Type | Description |
---|---|---|
node | Construct | The construct tree node associated with this construct. |
node
⚠️ Deprecated: undefined
Type:
Construct
The construct tree node associated with this construct.
Methods
Name | Description |
---|---|
add | Additional AWS account to add to the aws-auth configmap. |
add | Adds the specified IAM role to the system:masters RBAC group, which means that anyone that can assume it will be able to administer this Kubernetes system. |
add | Adds a mapping between an IAM role to a Kubernetes user and groups. |
add | Adds a mapping between an IAM user to a Kubernetes user and groups. |
to | Returns a string representation of this construct. |
Account(accountId)
addpublic addAccount(accountId: string): void
⚠️ Deprecated: undefined
Parameters
- accountId
string
— account number.
Additional AWS account to add to the aws-auth configmap.
MastersRole(role, username?)
addpublic addMastersRole(role: IRole, username?: string): void
⚠️ Deprecated: undefined
Parameters
- role
IRole
— The IAM role to add. - username
string
— Optional user (defaults to the role ARN).
Adds the specified IAM role to the system:masters
RBAC group, which means that anyone that can assume it will be able to administer this Kubernetes system.
RoleMapping(role, mapping)
addpublic addRoleMapping(role: IRole, mapping: Mapping): void
⚠️ Deprecated: undefined
Parameters
Adds a mapping between an IAM role to a Kubernetes user and groups.
UserMapping(user, mapping)
addpublic addUserMapping(user: IUser, mapping: Mapping): void
⚠️ Deprecated: undefined
Parameters
Adds a mapping between an IAM user to a Kubernetes user and groups.
String()
topublic toString(): string
⚠️ Deprecated: undefined
Returns
string
Returns a string representation of this construct.