Class: AWSCDK::XRay::CfnSamplingRule::SamplingRuleUpdateProperty

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

Overview

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes: nil, fixed_rate: nil, host: nil, http_method: nil, priority: nil, reservoir_size: nil, resource_arn: nil, rule_arn: nil, rule_name: nil, sampling_rate_boost: nil, service_name: nil, service_type: nil, url_path: nil) ⇒ SamplingRuleUpdateProperty

Returns a new instance of SamplingRuleUpdateProperty.

Parameters:

  • attributes (AWSCDK::IResolvable, Hash{String => String}, nil) (defaults to: nil)

    Matches attributes derived from the request.

  • fixed_rate (Numeric, nil) (defaults to: nil)

    The percentage of matching requests to instrument, after the reservoir is exhausted.

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

    Matches the hostname from a request URL.

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

    Matches the HTTP method from a request URL.

  • priority (Numeric, nil) (defaults to: nil)

    The priority of the sampling rule.

  • reservoir_size (Numeric, nil) (defaults to: nil)

    A fixed number of matching requests to instrument per second, prior to applying the fixed rate.

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

    Matches the ARN of the AWS resource on which the service runs.

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

    The ARN of the sampling rule.

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

    The ARN of the sampling rule.

  • sampling_rate_boost (AWSCDK::IResolvable, AWSCDK::XRay::CfnSamplingRule::SamplingRateBoostProperty, nil) (defaults to: nil)
  • service_name (String, nil) (defaults to: nil)

    Matches the name that the service uses to identify itself in segments.

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

    Matches the origin that the service uses to identify its type in segments.

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

    Matches the path from a request URL.



851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
# File 'x_ray/cfn_sampling_rule.rb', line 851

def initialize(attributes: nil, fixed_rate: nil, host: nil, http_method: nil, priority: nil, reservoir_size: nil, resource_arn: nil, rule_arn: nil, rule_name: nil, sampling_rate_boost: nil, service_name: nil, service_type: nil, url_path: nil)
  @attributes = attributes
  Jsii::Type.check_type(@attributes, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsicHJpbWl0aXZlIjoic3RyaW5nIn0sImtpbmQiOiJtYXAifX1dfX0=")), "attributes") unless @attributes.nil?
  @fixed_rate = fixed_rate
  Jsii::Type.check_type(@fixed_rate, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "fixedRate") unless @fixed_rate.nil?
  @host = host
  Jsii::Type.check_type(@host, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "host") unless @host.nil?
  @http_method = http_method
  Jsii::Type.check_type(@http_method, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "httpMethod") unless @http_method.nil?
  @priority = priority
  Jsii::Type.check_type(@priority, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "priority") unless @priority.nil?
  @reservoir_size = reservoir_size
  Jsii::Type.check_type(@reservoir_size, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "reservoirSize") unless @reservoir_size.nil?
  @resource_arn = resource_arn
  Jsii::Type.check_type(@resource_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceArn") unless @resource_arn.nil?
  @rule_arn = rule_arn
  Jsii::Type.check_type(@rule_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ruleArn") unless @rule_arn.nil?
  @rule_name = rule_name
  Jsii::Type.check_type(@rule_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ruleName") unless @rule_name.nil?
  @sampling_rate_boost = sampling_rate_boost.is_a?(Hash) ? ::AWSCDK::XRay::CfnSamplingRule::SamplingRateBoostProperty.new(**sampling_rate_boost.transform_keys(&:to_sym)) : sampling_rate_boost
  Jsii::Type.check_type(@sampling_rate_boost, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c194cmF5LkNmblNhbXBsaW5nUnVsZS5TYW1wbGluZ1JhdGVCb29zdFByb3BlcnR5In1dfX0=")), "samplingRateBoost") unless @sampling_rate_boost.nil?
  @service_name = service_name
  Jsii::Type.check_type(@service_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceName") unless @service_name.nil?
  @service_type = service_type
  Jsii::Type.check_type(@service_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceType") unless @service_type.nil?
  @url_path = url_path
  Jsii::Type.check_type(@url_path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "urlPath") unless @url_path.nil?
end

Instance Attribute Details

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

Matches attributes derived from the request.



884
885
886
# File 'x_ray/cfn_sampling_rule.rb', line 884

def attributes
  @attributes
end

#fixed_rateNumeric? (readonly)

The percentage of matching requests to instrument, after the reservoir is exhausted.



889
890
891
# File 'x_ray/cfn_sampling_rule.rb', line 889

def fixed_rate
  @fixed_rate
end

#hostString? (readonly)

Matches the hostname from a request URL.



894
895
896
# File 'x_ray/cfn_sampling_rule.rb', line 894

def host
  @host
end

#http_methodString? (readonly)

Matches the HTTP method from a request URL.



899
900
901
# File 'x_ray/cfn_sampling_rule.rb', line 899

def http_method
  @http_method
end

#priorityNumeric? (readonly)

The priority of the sampling rule.



904
905
906
# File 'x_ray/cfn_sampling_rule.rb', line 904

def priority
  @priority
end

#reservoir_sizeNumeric? (readonly)

A fixed number of matching requests to instrument per second, prior to applying the fixed rate.

The reservoir is not used directly by services, but applies to all services using the rule collectively.



911
912
913
# File 'x_ray/cfn_sampling_rule.rb', line 911

def reservoir_size
  @reservoir_size
end

#resource_arnString? (readonly)

Matches the ARN of the AWS resource on which the service runs.



916
917
918
# File 'x_ray/cfn_sampling_rule.rb', line 916

def resource_arn
  @resource_arn
end

#rule_arnString? (readonly)

The ARN of the sampling rule.

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



923
924
925
# File 'x_ray/cfn_sampling_rule.rb', line 923

def rule_arn
  @rule_arn
end

#rule_nameString? (readonly)

The ARN of the sampling rule.

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



930
931
932
# File 'x_ray/cfn_sampling_rule.rb', line 930

def rule_name
  @rule_name
end

#service_nameString? (readonly)

Matches the name that the service uses to identify itself in segments.



938
939
940
# File 'x_ray/cfn_sampling_rule.rb', line 938

def service_name
  @service_name
end

#service_typeString? (readonly)

Matches the origin that the service uses to identify its type in segments.



943
944
945
# File 'x_ray/cfn_sampling_rule.rb', line 943

def service_type
  @service_type
end

#url_pathString? (readonly)

Matches the path from a request URL.



948
949
950
# File 'x_ray/cfn_sampling_rule.rb', line 948

def url_path
  @url_path
end

Class Method Details

.jsii_propertiesObject



950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
# File 'x_ray/cfn_sampling_rule.rb', line 950

def self.jsii_properties
  {
    :attributes => "attributes",
    :fixed_rate => "fixedRate",
    :host => "host",
    :http_method => "httpMethod",
    :priority => "priority",
    :reservoir_size => "reservoirSize",
    :resource_arn => "resourceArn",
    :rule_arn => "ruleArn",
    :rule_name => "ruleName",
    :sampling_rate_boost => "samplingRateBoost",
    :service_name => "serviceName",
    :service_type => "serviceType",
    :url_path => "urlPath",
  }
end

Instance Method Details

#to_jsiiObject



968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
# File 'x_ray/cfn_sampling_rule.rb', line 968

def to_jsii
  result = {}
  result.merge!({
    "attributes" => @attributes,
    "fixedRate" => @fixed_rate,
    "host" => @host,
    "httpMethod" => @http_method,
    "priority" => @priority,
    "reservoirSize" => @reservoir_size,
    "resourceArn" => @resource_arn,
    "ruleArn" => @rule_arn,
    "ruleName" => @rule_name,
    "samplingRateBoost" => @sampling_rate_boost,
    "serviceName" => @service_name,
    "serviceType" => @service_type,
    "urlPath" => @url_path,
  })
  result.compact
end