Class: AWSCDK::EKS::CfnAddon::PodIdentityAssociationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
eks/cfn_addon.rb

Overview

Amazon EKS Pod Identity associations provide the ability to manage credentials for your applications, similar to the way that Amazon EC2 instance profiles provide credentials to Amazon EC2 instances.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(role_arn:, service_account:) ⇒ PodIdentityAssociationProperty

Returns a new instance of PodIdentityAssociationProperty.

Parameters:

  • role_arn (String)

    The Amazon Resource Name (ARN) of the IAM role to associate with the service account.

  • service_account (String)

    The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.



671
672
673
674
675
676
# File 'eks/cfn_addon.rb', line 671

def initialize(role_arn:, service_account:)
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn")
  @service_account = 
  Jsii::Type.check_type(@service_account, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceAccount")
end

Instance Attribute Details

#role_arnString (readonly)

The Amazon Resource Name (ARN) of the IAM role to associate with the service account.

The EKS Pod Identity agent manages credentials to assume this role for applications in the containers in the Pods that use this service account.



684
685
686
# File 'eks/cfn_addon.rb', line 684

def role_arn
  @role_arn
end

#service_accountString (readonly)

The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.



689
690
691
# File 'eks/cfn_addon.rb', line 689

def 
  @service_account
end

Class Method Details

.jsii_propertiesObject



691
692
693
694
695
696
# File 'eks/cfn_addon.rb', line 691

def self.jsii_properties
  {
    :role_arn => "roleArn",
    :service_account => "serviceAccount",
  }
end

Instance Method Details

#to_jsiiObject



698
699
700
701
702
703
704
705
# File 'eks/cfn_addon.rb', line 698

def to_jsii
  result = {}
  result.merge!({
    "roleArn" => @role_arn,
    "serviceAccount" => @service_account,
  })
  result.compact
end