Class: AWSCDK::StepFunctionsTasks::DockerImage
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::StepFunctionsTasks::DockerImage
- Defined in:
- step_functions_tasks/docker_image.rb
Overview
Creates IDockerImage instances.
Class Method Summary collapse
-
.from_asset(scope, id, props) ⇒ AWSCDK::StepFunctionsTasks::DockerImage
Reference a Docker image that is provided as an Asset in the current app.
-
.from_ecr_repository(repository, tag_or_digest = nil) ⇒ AWSCDK::StepFunctionsTasks::DockerImage
Reference a Docker image stored in an ECR repository.
-
.from_json_expression(expression, allow_any_ecr_image_pull = nil) ⇒ AWSCDK::StepFunctionsTasks::DockerImage
Reference a Docker image which URI is obtained from the task's input.
-
.from_registry(image_uri) ⇒ AWSCDK::StepFunctionsTasks::DockerImage
Reference a Docker image by it's URI.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#bind(task) ⇒ AWSCDK::StepFunctionsTasks::DockerImageConfig
Called when the image is used by a SageMaker task.
-
#initialize ⇒ DockerImage
constructor
A new instance of DockerImage.
Constructor Details
#initialize ⇒ DockerImage
Returns a new instance of DockerImage.
8 9 10 |
# File 'step_functions_tasks/docker_image.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.from_asset(scope, id, props) ⇒ AWSCDK::StepFunctionsTasks::DockerImage
Reference a Docker image that is provided as an Asset in the current app.
24 25 26 27 28 29 30 |
# File 'step_functions_tasks/docker_image.rb', line 24 def self.from_asset(scope, id, props) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") props = props.is_a?(Hash) ? ::AWSCDK::ECRAssets::DockerImageAssetProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNyX2Fzc2V0cy5Eb2NrZXJJbWFnZUFzc2V0UHJvcHMifQ==")), "props") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_stepfunctions_tasks.DockerImage", "fromAsset", [scope, id, props]) end |
.from_ecr_repository(repository, tag_or_digest = nil) ⇒ AWSCDK::StepFunctionsTasks::DockerImage
Reference a Docker image stored in an ECR repository.
37 38 39 40 41 |
# File 'step_functions_tasks/docker_image.rb', line 37 def self.from_ecr_repository(repository, tag_or_digest = nil) Jsii::Type.check_type(repository, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWNyLklSZXBvc2l0b3J5In0=")), "repository") Jsii::Type.check_type(tag_or_digest, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tagOrDigest") unless tag_or_digest.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_stepfunctions_tasks.DockerImage", "fromEcrRepository", [repository, tag_or_digest]) end |
.from_json_expression(expression, allow_any_ecr_image_pull = nil) ⇒ AWSCDK::StepFunctionsTasks::DockerImage
Reference a Docker image which URI is obtained from the task's input.
48 49 50 51 52 |
# File 'step_functions_tasks/docker_image.rb', line 48 def self.from_json_expression(expression, allow_any_ecr_image_pull = nil) Jsii::Type.check_type(expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "expression") Jsii::Type.check_type(allow_any_ecr_image_pull, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "allowAnyEcrImagePull") unless allow_any_ecr_image_pull.nil? Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_stepfunctions_tasks.DockerImage", "fromJsonExpression", [expression, allow_any_ecr_image_pull]) end |
.from_registry(image_uri) ⇒ AWSCDK::StepFunctionsTasks::DockerImage
Reference a Docker image by it's URI.
When referencing ECR images, prefer using in_ecr.
60 61 62 63 |
# File 'step_functions_tasks/docker_image.rb', line 60 def self.from_registry(image_uri) Jsii::Type.check_type(image_uri, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "imageUri") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_stepfunctions_tasks.DockerImage", "fromRegistry", [image_uri]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 |
# File 'step_functions_tasks/docker_image.rb', line 12 def self.jsii_overridable_methods { :bind => { kind: :method, name: "bind", is_optional: false }, } end |
Instance Method Details
#bind(task) ⇒ AWSCDK::StepFunctionsTasks::DockerImageConfig
Called when the image is used by a SageMaker task.
69 70 71 72 |
# File 'step_functions_tasks/docker_image.rb', line 69 def bind(task) Jsii::Type.check_type(task, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9uc190YXNrcy5JU2FnZU1ha2VyVGFzayJ9")), "task") jsii_call_method("bind", [task]) end |