Class: AWSCDK::AppRunner::CfnService::InstanceConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
app_runner/cfn_service.rb

Overview

Describes the runtime configuration of an AWS App Runner service instance (scaling unit).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cpu: nil, instance_role_arn: nil, memory: nil) ⇒ InstanceConfigurationProperty

Returns a new instance of InstanceConfigurationProperty.

Parameters:

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

    The number of CPU units reserved for each instance of your App Runner service.

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

    The Amazon Resource Name (ARN) of an IAM role that provides permissions to your App Runner service.

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

    The amount of memory, in MB or GB, reserved for each instance of your App Runner service.



1269
1270
1271
1272
1273
1274
1275
1276
# File 'app_runner/cfn_service.rb', line 1269

def initialize(cpu: nil, instance_role_arn: nil, memory: nil)
  @cpu = cpu
  Jsii::Type.check_type(@cpu, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "cpu") unless @cpu.nil?
  @instance_role_arn = instance_role_arn
  Jsii::Type.check_type(@instance_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "instanceRoleArn") unless @instance_role_arn.nil?
  @memory = memory
  Jsii::Type.check_type(@memory, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "memory") unless @memory.nil?
end

Instance Attribute Details

#cpuString? (readonly)

The number of CPU units reserved for each instance of your App Runner service.

Default: 1 vCPU



1284
1285
1286
# File 'app_runner/cfn_service.rb', line 1284

def cpu
  @cpu
end

#instance_role_arnString? (readonly)

The Amazon Resource Name (ARN) of an IAM role that provides permissions to your App Runner service.

These are permissions that your code needs when it calls any AWS APIs.



1291
1292
1293
# File 'app_runner/cfn_service.rb', line 1291

def instance_role_arn
  @instance_role_arn
end

#memoryString? (readonly)

The amount of memory, in MB or GB, reserved for each instance of your App Runner service.

Default: 2 GB



1298
1299
1300
# File 'app_runner/cfn_service.rb', line 1298

def memory
  @memory
end

Class Method Details

.jsii_propertiesObject



1300
1301
1302
1303
1304
1305
1306
# File 'app_runner/cfn_service.rb', line 1300

def self.jsii_properties
  {
    :cpu => "cpu",
    :instance_role_arn => "instanceRoleArn",
    :memory => "memory",
  }
end

Instance Method Details

#to_jsiiObject



1308
1309
1310
1311
1312
1313
1314
1315
1316
# File 'app_runner/cfn_service.rb', line 1308

def to_jsii
  result = {}
  result.merge!({
    "cpu" => @cpu,
    "instanceRoleArn" => @instance_role_arn,
    "memory" => @memory,
  })
  result.compact
end