Class: AWSCDK::XRay::CfnSamplingRuleProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
x_ray/cfn_sampling_rule_props.rb

Overview

Properties for defining a CfnSamplingRule.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rule_name: nil, sampling_rule: nil, sampling_rule_record: nil, sampling_rule_update: nil, tags: nil) ⇒ CfnSamplingRuleProps

Returns a new instance of CfnSamplingRuleProps.

Parameters:



14
15
16
17
18
19
20
21
22
23
24
25
# File 'x_ray/cfn_sampling_rule_props.rb', line 14

def initialize(rule_name: nil, sampling_rule: nil, sampling_rule_record: nil, sampling_rule_update: nil, tags: nil)
  @rule_name = rule_name
  Jsii::Type.check_type(@rule_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ruleName") unless @rule_name.nil?
  @sampling_rule = sampling_rule.is_a?(Hash) ? ::AWSCDK::XRay::CfnSamplingRule::SamplingRuleProperty.new(**sampling_rule.transform_keys(&:to_sym)) : sampling_rule
  Jsii::Type.check_type(@sampling_rule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c194cmF5LkNmblNhbXBsaW5nUnVsZS5TYW1wbGluZ1J1bGVQcm9wZXJ0eSJ9XX19")), "samplingRule") unless @sampling_rule.nil?
  @sampling_rule_record = sampling_rule_record.is_a?(Hash) ? ::AWSCDK::XRay::CfnSamplingRule::SamplingRuleRecordProperty.new(**sampling_rule_record.transform_keys(&:to_sym)) : sampling_rule_record
  Jsii::Type.check_type(@sampling_rule_record, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c194cmF5LkNmblNhbXBsaW5nUnVsZS5TYW1wbGluZ1J1bGVSZWNvcmRQcm9wZXJ0eSJ9XX19")), "samplingRuleRecord") unless @sampling_rule_record.nil?
  @sampling_rule_update = sampling_rule_update.is_a?(Hash) ? ::AWSCDK::XRay::CfnSamplingRule::SamplingRuleUpdateProperty.new(**sampling_rule_update.transform_keys(&:to_sym)) : sampling_rule_update
  Jsii::Type.check_type(@sampling_rule_update, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c194cmF5LkNmblNhbXBsaW5nUnVsZS5TYW1wbGluZ1J1bGVVcGRhdGVQcm9wZXJ0eSJ9XX19")), "samplingRuleUpdate") unless @sampling_rule_update.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

#rule_nameString? (readonly)

Deprecated.

this property has been deprecated

The ARN of the sampling rule.

Specify a rule by either name or ARN, but not both.



34
35
36
# File 'x_ray/cfn_sampling_rule_props.rb', line 34

def rule_name
  @rule_name
end

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

The sampling rule to be created or updated.



39
40
41
# File 'x_ray/cfn_sampling_rule_props.rb', line 39

def sampling_rule
  @sampling_rule
end

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

Deprecated.

this property has been deprecated



43
44
45
# File 'x_ray/cfn_sampling_rule_props.rb', line 43

def sampling_rule_record
  @sampling_rule_record
end

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

Deprecated.

this property has been deprecated



47
48
49
# File 'x_ray/cfn_sampling_rule_props.rb', line 47

def sampling_rule_update
  @sampling_rule_update
end

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

An array of key-value pairs to apply to this resource.



52
53
54
# File 'x_ray/cfn_sampling_rule_props.rb', line 52

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



54
55
56
57
58
59
60
61
62
# File 'x_ray/cfn_sampling_rule_props.rb', line 54

def self.jsii_properties
  {
    :rule_name => "ruleName",
    :sampling_rule => "samplingRule",
    :sampling_rule_record => "samplingRuleRecord",
    :sampling_rule_update => "samplingRuleUpdate",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



64
65
66
67
68
69
70
71
72
73
74
# File 'x_ray/cfn_sampling_rule_props.rb', line 64

def to_jsii
  result = {}
  result.merge!({
    "ruleName" => @rule_name,
    "samplingRule" => @sampling_rule,
    "samplingRuleRecord" => @sampling_rule_record,
    "samplingRuleUpdate" => @sampling_rule_update,
    "tags" => @tags,
  })
  result.compact
end