Class: AWSCDK::KinesisFirehose::DeliveryStream

Inherits:
Resource
  • Object
show all
Includes:
IDeliveryStream
Defined in:
kinesis_firehose/delivery_stream.rb

Overview

Create a Amazon Data Firehose delivery stream.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scope, id, props) ⇒ DeliveryStream

Returns a new instance of DeliveryStream.

Parameters:



12
13
14
15
16
17
18
# File 'kinesis_firehose/delivery_stream.rb', line 12

def initialize(scope, id, props)
  props = props.is_a?(Hash) ? ::AWSCDK::KinesisFirehose::DeliveryStreamProps.new(**props.transform_keys(&:to_sym)) : 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")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2luZXNpc2ZpcmVob3NlLkRlbGl2ZXJ5U3RyZWFtUHJvcHMifQ==")), "props")
  Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props)
end

Class Method Details

.from_delivery_stream_arn(scope, id, delivery_stream_arn) ⇒ AWSCDK::KinesisFirehose::IDeliveryStream

Import an existing delivery stream from its ARN.

Parameters:

  • scope (Constructs::Construct)
  • id (String)
  • delivery_stream_arn (String)

Returns:



56
57
58
59
60
61
# File 'kinesis_firehose/delivery_stream.rb', line 56

def self.from_delivery_stream_arn(scope, id, delivery_stream_arn)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(delivery_stream_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deliveryStreamArn")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_kinesisfirehose.DeliveryStream", "fromDeliveryStreamArn", [scope, id, delivery_stream_arn])
end

.from_delivery_stream_attributes(scope, id, attrs) ⇒ AWSCDK::KinesisFirehose::IDeliveryStream

Import an existing delivery stream from its attributes.

Parameters:

Returns:



69
70
71
72
73
74
75
# File 'kinesis_firehose/delivery_stream.rb', line 69

def self.from_delivery_stream_attributes(scope, id, attrs)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  attrs = attrs.is_a?(Hash) ? ::AWSCDK::KinesisFirehose::DeliveryStreamAttributes.new(**attrs.transform_keys(&:to_sym)) : attrs
  Jsii::Type.check_type(attrs, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfa2luZXNpc2ZpcmVob3NlLkRlbGl2ZXJ5U3RyZWFtQXR0cmlidXRlcyJ9")), "attrs")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_kinesisfirehose.DeliveryStream", "fromDeliveryStreamAttributes", [scope, id, attrs])
end

.from_delivery_stream_name(scope, id, delivery_stream_name) ⇒ AWSCDK::KinesisFirehose::IDeliveryStream

Import an existing delivery stream from its name.

Parameters:

  • scope (Constructs::Construct)
  • id (String)
  • delivery_stream_name (String)

Returns:



83
84
85
86
87
88
# File 'kinesis_firehose/delivery_stream.rb', line 83

def self.from_delivery_stream_name(scope, id, delivery_stream_name)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(delivery_stream_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deliveryStreamName")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_kinesisfirehose.DeliveryStream", "fromDeliveryStreamName", [scope, id, delivery_stream_name])
end

.jsii_overridable_methodsObject



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'kinesis_firehose/delivery_stream.rb', line 20

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :env => { kind: :property, name: "env", is_optional: false },
    :physical_name => { kind: :property, name: "physicalName", is_optional: false },
    :stack => { kind: :property, name: "stack", is_optional: false },
    :connections => { kind: :property, name: "connections", is_optional: false },
    :delivery_stream_arn => { kind: :property, name: "deliveryStreamArn", is_optional: false },
    :delivery_stream_name => { kind: :property, name: "deliveryStreamName", is_optional: false },
    :delivery_stream_ref => { kind: :property, name: "deliveryStreamRef", is_optional: false },
    :grant_principal => { kind: :property, name: "grantPrincipal", is_optional: false },
    :grants => { kind: :property, name: "grants", is_optional: false },
    :to_string => { kind: :method, name: "toString", is_optional: false },
    :with => { kind: :method, name: "with", is_optional: false },
    :apply_cross_stack_reference_strength => { kind: :method, name: "applyCrossStackReferenceStrength", is_optional: false },
    :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false },
    :generate_physical_name => { kind: :method, name: "generatePhysicalName", is_optional: false },
    :get_resource_arn_attribute => { kind: :method, name: "getResourceArnAttribute", is_optional: false },
    :get_resource_name_attribute => { kind: :method, name: "getResourceNameAttribute", is_optional: false },
    :grant => { kind: :method, name: "grant", is_optional: false },
    :grant_put_records => { kind: :method, name: "grantPutRecords", is_optional: false },
    :metric => { kind: :method, name: "metric", is_optional: false },
    :metric_backup_to_s3_bytes => { kind: :method, name: "metricBackupToS3Bytes", is_optional: false },
    :metric_backup_to_s3_data_freshness => { kind: :method, name: "metricBackupToS3DataFreshness", is_optional: false },
    :metric_backup_to_s3_records => { kind: :method, name: "metricBackupToS3Records", is_optional: false },
    :metric_incoming_bytes => { kind: :method, name: "metricIncomingBytes", is_optional: false },
    :metric_incoming_records => { kind: :method, name: "metricIncomingRecords", is_optional: false },
  }
end

.PROPERTY_INJECTION_IDString

Uniquely identifies this class.

Returns:

  • (String)


136
137
138
# File 'kinesis_firehose/delivery_stream.rb', line 136

def self.PROPERTY_INJECTION_ID()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_kinesisfirehose.DeliveryStream", "PROPERTY_INJECTION_ID")
end

Instance Method Details

#apply_cross_stack_reference_strength(strength) ⇒ void

This method returns an undefined value.

Override the cross-stack reference strength for this resource.

When set, any cross-stack reference to this resource will use the specified mechanism instead of the global default determined by the @aws-cdk/core:defaultCrossStackReferences context key. This is useful for selectively weakening specific references to avoid the "deadly embrace" problem without changing the app-wide default.

Parameters:



215
216
217
218
# File 'kinesis_firehose/delivery_stream.rb', line 215

def apply_cross_stack_reference_strength(strength)
  Jsii::Type.check_type(strength, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZWZlcmVuY2VTdHJlbmd0aCJ9")), "strength")
  jsii_call_method("applyCrossStackReferenceStrength", [strength])
end

#apply_removal_policy(policy) ⇒ void

This method returns an undefined value.

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:



232
233
234
235
# File 'kinesis_firehose/delivery_stream.rb', line 232

def apply_removal_policy(policy)
  Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy")
  jsii_call_method("applyRemovalPolicy", [policy])
end

#connectionsAWSCDK::EC2::Connections

Network connections between Amazon Data Firehose and other resources, i.e. Redshift cluster.



143
144
145
# File 'kinesis_firehose/delivery_stream.rb', line 143

def connections()
  jsii_get_property("connections")
end

#delivery_stream_arnString

The ARN of the delivery stream.

Returns:

  • (String)


150
151
152
# File 'kinesis_firehose/delivery_stream.rb', line 150

def delivery_stream_arn()
  jsii_get_property("deliveryStreamArn")
end

#delivery_stream_nameString

The name of the delivery stream.

Returns:

  • (String)


157
158
159
# File 'kinesis_firehose/delivery_stream.rb', line 157

def delivery_stream_name()
  jsii_get_property("deliveryStreamName")
end

#delivery_stream_refAWSCDK::Interfaces::AWSKinesisfirehose::DeliveryStreamReference

A reference to a DeliveryStream resource.



164
165
166
# File 'kinesis_firehose/delivery_stream.rb', line 164

def delivery_stream_ref()
  jsii_get_property("deliveryStreamRef")
end

#envAWSCDK::Interfaces::ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.



108
109
110
# File 'kinesis_firehose/delivery_stream.rb', line 108

def env()
  jsii_get_property("env")
end

#generate_physical_nameString

Returns:

  • (String)


238
239
240
# File 'kinesis_firehose/delivery_stream.rb', line 238

def generate_physical_name()
  jsii_call_method("generatePhysicalName", [])
end

#get_resource_arn_attribute(arn_attr, arn_components) ⇒ String

Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. bucket.bucketArn).

Normally, this token will resolve to arn_attr, but if the resource is referenced across environments, arn_components will be used to synthesize a concrete ARN with the resource's physical name. Make sure to reference this.physicalName in arn_components.

Parameters:

  • arn_attr (String)

    The CFN attribute which resolves to the ARN of the resource.

  • arn_components (AWSCDK::ARNComponents)

    The format of the ARN of this resource.

Returns:

  • (String)


252
253
254
255
256
257
# File 'kinesis_firehose/delivery_stream.rb', line 252

def get_resource_arn_attribute(arn_attr, arn_components)
  Jsii::Type.check_type(arn_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "arnAttr")
  arn_components = arn_components.is_a?(Hash) ? ::AWSCDK::ARNComponents.new(**arn_components.transform_keys(&:to_sym)) : arn_components
  Jsii::Type.check_type(arn_components, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5Bcm5Db21wb25lbnRzIn0=")), "arnComponents")
  jsii_call_method("getResourceArnAttribute", [arn_attr, arn_components])
end

#get_resource_name_attribute(name_attr) ⇒ String

Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. bucket.bucketName).

Normally, this token will resolve to name_attr, but if the resource is referenced across environments, it will be resolved to this.physicalName, which will be a concrete name.

Parameters:

  • name_attr (String)

    The CFN attribute which resolves to the resource's name.

Returns:

  • (String)


267
268
269
270
# File 'kinesis_firehose/delivery_stream.rb', line 267

def get_resource_name_attribute(name_attr)
  Jsii::Type.check_type(name_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "nameAttr")
  jsii_call_method("getResourceNameAttribute", [name_attr])
end

#grant(grantee, *actions) ⇒ AWSCDK::IAM::Grant

[disable-awslint:no-grants].

Parameters:

Returns:



277
278
279
280
281
282
283
# File 'kinesis_firehose/delivery_stream.rb', line 277

def grant(grantee, *actions)
  Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee")
  actions.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "actions[#{index}]")
  end
  jsii_call_method("grant", [grantee, *actions])
end

#grant_principalAWSCDK::IAM::IPrincipal

The principal to grant permissions to.



171
172
173
# File 'kinesis_firehose/delivery_stream.rb', line 171

def grant_principal()
  jsii_get_property("grantPrincipal")
end

#grant_put_records(grantee) ⇒ AWSCDK::IAM::Grant

The use of this method is discouraged. Please use grants.putRecords() instead.

[disable-awslint:no-grants]

Parameters:

Returns:



291
292
293
294
# File 'kinesis_firehose/delivery_stream.rb', line 291

def grant_put_records(grantee)
  Jsii::Type.check_type(grantee, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLklHcmFudGFibGUifQ==")), "grantee")
  jsii_call_method("grantPutRecords", [grantee])
end

#grantsAWSCDK::KinesisFirehose::DeliveryStreamGrants

Collection of grant methods for a DeliveryStream.



178
179
180
# File 'kinesis_firehose/delivery_stream.rb', line 178

def grants()
  jsii_get_property("grants")
end

#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric

Return the given named metric for this delivery stream.

Parameters:

Returns:



301
302
303
304
305
306
# File 'kinesis_firehose/delivery_stream.rb', line 301

def metric(metric_name, props = nil)
  Jsii::Type.check_type(metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName")
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metric", [metric_name, props])
end

#metric_backup_to_s3_bytes(props = nil) ⇒ AWSCDK::CloudWatch::Metric

Metric for the number of bytes delivered to Amazon S3 for backup over the specified time period.

By default, this metric will be calculated as an average over a period of 5 minutes.

Parameters:

Returns:



314
315
316
317
318
# File 'kinesis_firehose/delivery_stream.rb', line 314

def metric_backup_to_s3_bytes(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metricBackupToS3Bytes", [props])
end

#metric_backup_to_s3_data_freshness(props = nil) ⇒ AWSCDK::CloudWatch::Metric

Metric for the age (from getting into Amazon Data Firehose to now) of the oldest record in Amazon Data Firehose.

Any record older than this age has been delivered to the Amazon S3 bucket for backup.

By default, this metric will be calculated as an average over a period of 5 minutes.

Parameters:

Returns:



328
329
330
331
332
# File 'kinesis_firehose/delivery_stream.rb', line 328

def metric_backup_to_s3_data_freshness(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metricBackupToS3DataFreshness", [props])
end

#metric_backup_to_s3_records(props = nil) ⇒ AWSCDK::CloudWatch::Metric

Metric for the number of records delivered to Amazon S3 for backup over the specified time period.

By default, this metric will be calculated as an average over a period of 5 minutes.

Parameters:

Returns:



340
341
342
343
344
# File 'kinesis_firehose/delivery_stream.rb', line 340

def metric_backup_to_s3_records(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metricBackupToS3Records", [props])
end

#metric_incoming_bytes(props = nil) ⇒ AWSCDK::CloudWatch::Metric

Metric for the number of bytes ingested successfully into the delivery stream over the specified time period after throttling.

By default, this metric will be calculated as an average over a period of 5 minutes.

Parameters:

Returns:



352
353
354
355
356
# File 'kinesis_firehose/delivery_stream.rb', line 352

def metric_incoming_bytes(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metricIncomingBytes", [props])
end

#metric_incoming_records(props = nil) ⇒ AWSCDK::CloudWatch::Metric

Metric for the number of records ingested successfully into the delivery stream over the specified time period after throttling.

By default, this metric will be calculated as an average over a period of 5 minutes.

Parameters:

Returns:



364
365
366
367
368
# File 'kinesis_firehose/delivery_stream.rb', line 364

def metric_incoming_records(props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metricIncomingRecords", [props])
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


93
94
95
# File 'kinesis_firehose/delivery_stream.rb', line 93

def node()
  jsii_get_property("node")
end

#physical_nameString

Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.

This value will resolve to one of the following:

  • a concrete value (e.g. "my-awesome-bucket")
  • undefined, when a name should be generated by CloudFormation
  • a concrete name generated automatically during synthesis, in cross-environment scenarios.

Returns:

  • (String)


122
123
124
# File 'kinesis_firehose/delivery_stream.rb', line 122

def physical_name()
  jsii_get_property("physicalName")
end

#stackAWSCDK::Stack

The stack in which this resource is defined.

Returns:



129
130
131
# File 'kinesis_firehose/delivery_stream.rb', line 129

def stack()
  jsii_get_property("stack")
end

#to_stringString

Returns a string representation of this construct.

Returns:

  • (String)


185
186
187
# File 'kinesis_firehose/delivery_stream.rb', line 185

def to_string()
  jsii_call_method("toString", [])
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited. Use multiple with() calls if subsequent mixins should apply to added constructs.

Parameters:

  • mixins (Array<Constructs::IMixin>)

Returns:

  • (Constructs::IConstruct)


198
199
200
201
202
203
# File 'kinesis_firehose/delivery_stream.rb', line 198

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end