Class: AWSCDK::Logs::CfnDeliveryDestinationProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
logs/cfn_delivery_destination_props.rb

Overview

Properties for defining a CfnDeliveryDestination.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, delivery_destination_policy: nil, delivery_destination_type: nil, destination_resource_arn: nil, output_format: nil, tags: nil) ⇒ CfnDeliveryDestinationProps

Returns a new instance of CfnDeliveryDestinationProps.

Parameters:

  • name (String)

    The name of this delivery destination.

  • delivery_destination_policy (AWSCDK::IResolvable, AWSCDK::Logs::CfnDeliveryDestination::DestinationPolicyProperty, nil) (defaults to: nil)

    An IAM policy that grants permissions to CloudWatch Logs to deliver logs cross-account to a specified destination in this account.

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

    Displays whether this delivery destination is CloudWatch Logs, Amazon S3, Firehose, or X-Ray.

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

    The ARN of the AWS destination that this delivery destination represents.

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

    The format of the logs that are sent to this delivery destination.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    An array of key-value pairs to apply to the delivery destination.



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'logs/cfn_delivery_destination_props.rb', line 15

def initialize(name:, delivery_destination_policy: nil, delivery_destination_type: nil, destination_resource_arn: nil, output_format: nil, tags: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @delivery_destination_policy = delivery_destination_policy.is_a?(Hash) ? ::AWSCDK::Logs::CfnDeliveryDestination::DestinationPolicyProperty.new(**delivery_destination_policy.transform_keys(&:to_sym)) : delivery_destination_policy
  Jsii::Type.check_type(@delivery_destination_policy, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19sb2dzLkNmbkRlbGl2ZXJ5RGVzdGluYXRpb24uRGVzdGluYXRpb25Qb2xpY3lQcm9wZXJ0eSJ9XX19")), "deliveryDestinationPolicy") unless @delivery_destination_policy.nil?
  @delivery_destination_type = delivery_destination_type
  Jsii::Type.check_type(@delivery_destination_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "deliveryDestinationType") unless @delivery_destination_type.nil?
  @destination_resource_arn = destination_resource_arn
  Jsii::Type.check_type(@destination_resource_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destinationResourceArn") unless @destination_resource_arn.nil?
  @output_format = output_format
  Jsii::Type.check_type(@output_format, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "outputFormat") unless @output_format.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

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

An IAM policy that grants permissions to CloudWatch Logs to deliver logs cross-account to a specified destination in this account.

For examples of this policy, see Examples in the CloudWatch Logs API Reference.



41
42
43
# File 'logs/cfn_delivery_destination_props.rb', line 41

def delivery_destination_policy
  @delivery_destination_policy
end

#delivery_destination_typeString? (readonly)

Displays whether this delivery destination is CloudWatch Logs, Amazon S3, Firehose, or X-Ray.



46
47
48
# File 'logs/cfn_delivery_destination_props.rb', line 46

def delivery_destination_type
  @delivery_destination_type
end

#destination_resource_arnString? (readonly)

The ARN of the AWS destination that this delivery destination represents.

That AWS destination can be a log group in CloudWatch Logs , an Amazon S3 bucket, or a Firehose stream.



53
54
55
# File 'logs/cfn_delivery_destination_props.rb', line 53

def destination_resource_arn
  @destination_resource_arn
end

#nameString (readonly)

The name of this delivery destination.



34
35
36
# File 'logs/cfn_delivery_destination_props.rb', line 34

def name
  @name
end

#output_formatString? (readonly)

The format of the logs that are sent to this delivery destination.



58
59
60
# File 'logs/cfn_delivery_destination_props.rb', line 58

def output_format
  @output_format
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

An array of key-value pairs to apply to the delivery destination.

For more information, see Tag .



65
66
67
# File 'logs/cfn_delivery_destination_props.rb', line 65

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



67
68
69
70
71
72
73
74
75
76
# File 'logs/cfn_delivery_destination_props.rb', line 67

def self.jsii_properties
  {
    :name => "name",
    :delivery_destination_policy => "deliveryDestinationPolicy",
    :delivery_destination_type => "deliveryDestinationType",
    :destination_resource_arn => "destinationResourceArn",
    :output_format => "outputFormat",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



78
79
80
81
82
83
84
85
86
87
88
89
# File 'logs/cfn_delivery_destination_props.rb', line 78

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "deliveryDestinationPolicy" => @delivery_destination_policy,
    "deliveryDestinationType" => @delivery_destination_type,
    "destinationResourceArn" => @destination_resource_arn,
    "outputFormat" => @output_format,
    "tags" => @tags,
  })
  result.compact
end