Class: AWSCDK::StepFunctionsTasks::S3Location

Inherits:
Jsii::Object
  • Object
show all
Defined in:
step_functions_tasks/s3_location.rb

Overview

Constructs IS3Location objects.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeS3Location

Returns a new instance of S3Location.



8
9
10
# File 'step_functions_tasks/s3_location.rb', line 8

def initialize
  Jsii::Object.instance_method(:initialize).bind(self).call
end

Class Method Details

.from_bucket(bucket, key_prefix) ⇒ AWSCDK::StepFunctionsTasks::S3Location

An IS3Location built with a determined bucket and key prefix.

Parameters:

  • bucket (AWSCDK::S3::IBucket)

    is the bucket where the objects are to be stored.

  • key_prefix (String)

    is the key prefix used by the location.

Returns:

  • (AWSCDK::StepFunctionsTasks::S3Location)


23
24
25
26
27
# File 'step_functions_tasks/s3_location.rb', line 23

def self.from_bucket(bucket, key_prefix)
  Jsii::Type.check_type(bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket")
  Jsii::Type.check_type(key_prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "keyPrefix")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_stepfunctions_tasks.S3Location", "fromBucket", [bucket, key_prefix])
end

.from_json_expression(expression) ⇒ AWSCDK::StepFunctionsTasks::S3Location

An IS3Location determined fully by a JSONata expression or JSON Path from the task input.

Due to the dynamic nature of those locations, the IAM grants that will be set by grant_read and grant_write apply to the * resource.

Parameters:

  • expression (String)

    the JSON expression resolving to an S3 location URI.

Returns:

  • (AWSCDK::StepFunctionsTasks::S3Location)


36
37
38
39
# File 'step_functions_tasks/s3_location.rb', line 36

def self.from_json_expression(expression)
  Jsii::Type.check_type(expression, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "expression")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_stepfunctions_tasks.S3Location", "fromJsonExpression", [expression])
end

.jsii_overridable_methodsObject



12
13
14
15
16
# File 'step_functions_tasks/s3_location.rb', line 12

def self.jsii_overridable_methods
  {
    :bind => { kind: :method, name: "bind", is_optional: false },
  }
end

Instance Method Details

#bind(task, opts) ⇒ AWSCDK::StepFunctionsTasks::S3LocationConfig

Called when the S3Location is bound to a StepFunctions task.



46
47
48
49
50
51
# File 'step_functions_tasks/s3_location.rb', line 46

def bind(task, opts)
  Jsii::Type.check_type(task, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9uc190YXNrcy5JU2FnZU1ha2VyVGFzayJ9")), "task")
  opts = opts.is_a?(Hash) ? ::AWSCDK::StepFunctionsTasks::S3LocationBindOptions.new(**opts.transform_keys(&:to_sym)) : opts
  Jsii::Type.check_type(opts, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9uc190YXNrcy5TM0xvY2F0aW9uQmluZE9wdGlvbnMifQ==")), "opts")
  jsii_call_method("bind", [task, opts])
end