Class: AWSCDK::EKS::CfnFargateProfileProps

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

Overview

Properties for defining a CfnFargateProfile.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cluster_name:, pod_execution_role_arn:, selectors:, fargate_profile_name: nil, subnets: nil, tags: nil) ⇒ CfnFargateProfileProps

Returns a new instance of CfnFargateProfileProps.

Parameters:

  • cluster_name (String)

    The name of your cluster.

  • pod_execution_role_arn (String)

    The Amazon Resource Name (ARN) of the Pod execution role to use for a Pod that matches the selectors in the Fargate profile.

  • selectors (AWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::EKS::CfnFargateProfile::SelectorProperty>)

    The selectors to match for a Pod to use this Fargate profile.

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

    The name of the Fargate profile.

  • subnets (Array<String>, nil) (defaults to: nil)

    The IDs of subnets to launch a Pod into.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    Metadata that assists with categorization and organization.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'eks/cfn_fargate_profile_props.rb', line 15

def initialize(cluster_name:, pod_execution_role_arn:, selectors:, fargate_profile_name: nil, subnets: nil, tags: nil)
  @cluster_name = cluster_name
  Jsii::Type.check_type(@cluster_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "clusterName")
  @pod_execution_role_arn = pod_execution_role_arn
  Jsii::Type.check_type(@pod_execution_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "podExecutionRoleArn")
  @selectors = selectors
  Jsii::Type.check_type(@selectors, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkNmbkZhcmdhdGVQcm9maWxlLlNlbGVjdG9yUHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "selectors")
  @fargate_profile_name = fargate_profile_name
  Jsii::Type.check_type(@fargate_profile_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "fargateProfileName") unless @fargate_profile_name.nil?
  @subnets = subnets
  Jsii::Type.check_type(@subnets, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "subnets") unless @subnets.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#cluster_nameString (readonly)

The name of your cluster.



34
35
36
# File 'eks/cfn_fargate_profile_props.rb', line 34

def cluster_name
  @cluster_name
end

#fargate_profile_nameString? (readonly)

The name of the Fargate profile.



53
54
55
# File 'eks/cfn_fargate_profile_props.rb', line 53

def fargate_profile_name
  @fargate_profile_name
end

#pod_execution_role_arnString (readonly)

The Amazon Resource Name (ARN) of the Pod execution role to use for a Pod that matches the selectors in the Fargate profile.

The Pod execution role allows Fargate infrastructure to register with your cluster as a node, and it provides read access to Amazon ECR image repositories. For more information, see Pod execution role in the Amazon EKS User Guide .



41
42
43
# File 'eks/cfn_fargate_profile_props.rb', line 41

def pod_execution_role_arn
  @pod_execution_role_arn
end

#selectorsAWSCDK::IResolvable, Array<AWSCDK::IResolvable, AWSCDK::EKS::CfnFargateProfile::SelectorProperty> (readonly)

The selectors to match for a Pod to use this Fargate profile.

Each selector must have an associated Kubernetes namespace . Optionally, you can also specify labels for a namespace . You may specify up to five selectors in a Fargate profile.



48
49
50
# File 'eks/cfn_fargate_profile_props.rb', line 48

def selectors
  @selectors
end

#subnetsArray<String>? (readonly)

The IDs of subnets to launch a Pod into.

A Pod running on Fargate isn't assigned a public IP address, so only private subnets (with no direct route to an Internet Gateway) are accepted for this parameter.



60
61
62
# File 'eks/cfn_fargate_profile_props.rb', line 60

def subnets
  @subnets
end

#tagsArray<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.



67
68
69
# File 'eks/cfn_fargate_profile_props.rb', line 67

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



69
70
71
72
73
74
75
76
77
78
# File 'eks/cfn_fargate_profile_props.rb', line 69

def self.jsii_properties
  {
    :cluster_name => "clusterName",
    :pod_execution_role_arn => "podExecutionRoleArn",
    :selectors => "selectors",
    :fargate_profile_name => "fargateProfileName",
    :subnets => "subnets",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



80
81
82
83
84
85
86
87
88
89
90
91
# File 'eks/cfn_fargate_profile_props.rb', line 80

def to_jsii
  result = {}
  result.merge!({
    "clusterName" => @cluster_name,
    "podExecutionRoleArn" => @pod_execution_role_arn,
    "selectors" => @selectors,
    "fargateProfileName" => @fargate_profile_name,
    "subnets" => @subnets,
    "tags" => @tags,
  })
  result.compact
end