Class: AWSCDK::AppRunner::CfnService::SourceConfigurationProperty

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

Overview

Describes the source deployed to an AWS App Runner service.

It can be a code or an image repository.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authentication_configuration: nil, auto_deployments_enabled: nil, code_repository: nil, image_repository: nil) ⇒ SourceConfigurationProperty

Returns a new instance of SourceConfigurationProperty.

Parameters:



1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
# File 'app_runner/cfn_service.rb', line 1529

def initialize(authentication_configuration: nil, auto_deployments_enabled: nil, code_repository: nil, image_repository: nil)
  @authentication_configuration = authentication_configuration.is_a?(Hash) ? ::AWSCDK::AppRunner::CfnService::AuthenticationConfigurationProperty.new(**authentication_configuration.transform_keys(&:to_sym)) : authentication_configuration
  Jsii::Type.check_type(@authentication_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBydW5uZXIuQ2ZuU2VydmljZS5BdXRoZW50aWNhdGlvbkNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "authenticationConfiguration") unless @authentication_configuration.nil?
  @auto_deployments_enabled = auto_deployments_enabled
  Jsii::Type.check_type(@auto_deployments_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "autoDeploymentsEnabled") unless @auto_deployments_enabled.nil?
  @code_repository = code_repository.is_a?(Hash) ? ::AWSCDK::AppRunner::CfnService::CodeRepositoryProperty.new(**code_repository.transform_keys(&:to_sym)) : code_repository
  Jsii::Type.check_type(@code_repository, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBydW5uZXIuQ2ZuU2VydmljZS5Db2RlUmVwb3NpdG9yeVByb3BlcnR5In1dfX0=")), "codeRepository") unless @code_repository.nil?
  @image_repository = image_repository.is_a?(Hash) ? ::AWSCDK::AppRunner::CfnService::ImageRepositoryProperty.new(**image_repository.transform_keys(&:to_sym)) : image_repository
  Jsii::Type.check_type(@image_repository, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHBydW5uZXIuQ2ZuU2VydmljZS5JbWFnZVJlcG9zaXRvcnlQcm9wZXJ0eSJ9XX19")), "imageRepository") unless @image_repository.nil?
end

Instance Attribute Details

#authentication_configurationAWSCDK::IResolvable, ... (readonly)

Describes the resources that are needed to authenticate access to some source repositories.



1544
1545
1546
# File 'app_runner/cfn_service.rb', line 1544

def authentication_configuration
  @authentication_configuration
end

#auto_deployments_enabledBoolean, ... (readonly)

If true , continuous integration from the source repository is enabled for the App Runner service.

Each repository change (including any source code commit or new image version) starts a deployment.

Default: App Runner sets to false for a source image that uses an ECR Public repository or an ECR repository that's in an AWS account other than the one that the service is in. App Runner sets to true in all other cases (which currently include a source code repository or a source image using a same-account ECR repository).



1553
1554
1555
# File 'app_runner/cfn_service.rb', line 1553

def auto_deployments_enabled
  @auto_deployments_enabled
end

#code_repositoryAWSCDK::IResolvable, ... (readonly)

The description of a source code repository.

You must provide either this member or ImageRepository (but not both).



1560
1561
1562
# File 'app_runner/cfn_service.rb', line 1560

def code_repository
  @code_repository
end

#image_repositoryAWSCDK::IResolvable, ... (readonly)

The description of a source image repository.

You must provide either this member or CodeRepository (but not both).



1567
1568
1569
# File 'app_runner/cfn_service.rb', line 1567

def image_repository
  @image_repository
end

Class Method Details

.jsii_propertiesObject



1569
1570
1571
1572
1573
1574
1575
1576
# File 'app_runner/cfn_service.rb', line 1569

def self.jsii_properties
  {
    :authentication_configuration => "authenticationConfiguration",
    :auto_deployments_enabled => "autoDeploymentsEnabled",
    :code_repository => "codeRepository",
    :image_repository => "imageRepository",
  }
end

Instance Method Details

#to_jsiiObject



1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
# File 'app_runner/cfn_service.rb', line 1578

def to_jsii
  result = {}
  result.merge!({
    "authenticationConfiguration" => @authentication_configuration,
    "autoDeploymentsEnabled" => @auto_deployments_enabled,
    "codeRepository" => @code_repository,
    "imageRepository" => @image_repository,
  })
  result.compact
end