Class: AWSCDK::EKS::CfnPodIdentityAssociationProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::EKS::CfnPodIdentityAssociationProps
- Defined in:
- eks/cfn_pod_identity_association_props.rb
Overview
Properties for defining a CfnPodIdentityAssociation.
Instance Attribute Summary collapse
-
#cluster_name ⇒ String
readonly
The name of the cluster that the association is in.
-
#disable_session_tags ⇒ Boolean, ...
readonly
The state of the automatic sessions tags.
-
#namespace ⇒ String
readonly
The name of the Kubernetes namespace inside the cluster to create the association in.
-
#policy ⇒ String?
readonly
The policy of the pod identity association.
-
#role_arn ⇒ String
readonly
The Amazon Resource Name (ARN) of the IAM role to associate with the service account.
-
#service_account ⇒ String
readonly
The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
Metadata that assists with categorization and organization.
-
#target_role_arn ⇒ String?
readonly
The Amazon Resource Name (ARN) of the target IAM role to associate with the service account.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cluster_name:, namespace:, role_arn:, service_account:, disable_session_tags: nil, policy: nil, tags: nil, target_role_arn: nil) ⇒ CfnPodIdentityAssociationProps
constructor
A new instance of CfnPodIdentityAssociationProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(cluster_name:, namespace:, role_arn:, service_account:, disable_session_tags: nil, policy: nil, tags: nil, target_role_arn: nil) ⇒ CfnPodIdentityAssociationProps
Returns a new instance of CfnPodIdentityAssociationProps.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'eks/cfn_pod_identity_association_props.rb', line 17 def initialize(cluster_name:, namespace:, role_arn:, service_account:, disable_session_tags: nil, policy: nil, tags: nil, target_role_arn: nil) @cluster_name = cluster_name Jsii::Type.check_type(@cluster_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterName") @namespace = namespace Jsii::Type.check_type(@namespace, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "namespace") @role_arn = role_arn Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn") @service_account = service_account Jsii::Type.check_type(@service_account, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceAccount") @disable_session_tags = Jsii::Type.check_type(@disable_session_tags, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "disableSessionTags") unless @disable_session_tags.nil? @policy = policy Jsii::Type.check_type(@policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "policy") unless @policy.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? @target_role_arn = target_role_arn Jsii::Type.check_type(@target_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetRoleArn") unless @target_role_arn.nil? end |
Instance Attribute Details
#cluster_name ⇒ String (readonly)
The name of the cluster that the association is in.
40 41 42 |
# File 'eks/cfn_pod_identity_association_props.rb', line 40 def cluster_name @cluster_name end |
#disable_session_tags ⇒ Boolean, ... (readonly)
The state of the automatic sessions tags. The value of true disables these tags.
EKS Pod Identity adds a pre-defined set of session tags when it assumes the role. You can use these tags to author a single role that can work across resources by allowing access to AWS resources based on matching tags. By default, EKS Pod Identity attaches six tags, including tags for cluster name, namespace, and service account name. For the list of tags added by EKS Pod Identity, see List of session tags added by EKS Pod Identity in the Amazon EKS User Guide .
66 67 68 |
# File 'eks/cfn_pod_identity_association_props.rb', line 66 def @disable_session_tags end |
#namespace ⇒ String (readonly)
The name of the Kubernetes namespace inside the cluster to create the association in.
The service account and the Pods that use the service account must be in this namespace.
47 48 49 |
# File 'eks/cfn_pod_identity_association_props.rb', line 47 def namespace @namespace end |
#policy ⇒ String? (readonly)
The policy of the pod identity association.
71 72 73 |
# File 'eks/cfn_pod_identity_association_props.rb', line 71 def policy @policy end |
#role_arn ⇒ String (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.
54 55 56 |
# File 'eks/cfn_pod_identity_association_props.rb', line 54 def role_arn @role_arn end |
#service_account ⇒ String (readonly)
The name of the Kubernetes service account inside the cluster to associate the IAM credentials with.
59 60 61 |
# File 'eks/cfn_pod_identity_association_props.rb', line 59 def service_account @service_account end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
Metadata that assists with categorization and organization.
Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or AWS resources.
The following basic restrictions apply to tags:
- Maximum number of tags per resource – 50
- For each resource, each tag key must be unique, and each tag key can have only one value.
- Maximum key length – 128 Unicode characters in UTF-8
- Maximum value length – 256 Unicode characters in UTF-8
- If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : /
86 87 88 |
# File 'eks/cfn_pod_identity_association_props.rb', line 86 def @tags end |
#target_role_arn ⇒ String? (readonly)
The Amazon Resource Name (ARN) of the target IAM role to associate with the service account.
This role is assumed by using the EKS Pod Identity association role, then the credentials for this role are injected into the Pod.
93 94 95 |
# File 'eks/cfn_pod_identity_association_props.rb', line 93 def target_role_arn @target_role_arn end |
Class Method Details
.jsii_properties ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'eks/cfn_pod_identity_association_props.rb', line 95 def self.jsii_properties { :cluster_name => "clusterName", :namespace => "namespace", :role_arn => "roleArn", :service_account => "serviceAccount", :disable_session_tags => "disableSessionTags", :policy => "policy", :tags => "tags", :target_role_arn => "targetRoleArn", } end |
Instance Method Details
#to_jsii ⇒ Object
108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'eks/cfn_pod_identity_association_props.rb', line 108 def to_jsii result = {} result.merge!({ "clusterName" => @cluster_name, "namespace" => @namespace, "roleArn" => @role_arn, "serviceAccount" => @service_account, "disableSessionTags" => @disable_session_tags, "policy" => @policy, "tags" => @tags, "targetRoleArn" => @target_role_arn, }) result.compact end |