Class: AWSCDK::CodeDeploy::TrafficRouting
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::CodeDeploy::TrafficRouting
- Defined in:
- code_deploy/traffic_routing.rb
Overview
Represents how traffic is shifted during a CodeDeploy deployment.
Direct Known Subclasses
AllAtOnceTrafficRouting, TimeBasedCanaryTrafficRouting, TimeBasedLinearTrafficRouting
Class Method Summary collapse
-
.all_at_once ⇒ AWSCDK::CodeDeploy::TrafficRouting
Shifts 100% of traffic in a single shift.
- .jsii_overridable_methods ⇒ Object
-
.time_based_canary(props) ⇒ AWSCDK::CodeDeploy::TrafficRouting
Shifts a specified percentage of traffic, waits for a specified amount of time, then shifts the rest of traffic.
-
.time_based_linear(props) ⇒ AWSCDK::CodeDeploy::TrafficRouting
Keeps shifting a specified percentage of traffic until reaching 100%, waiting for a specified amount of time in between each traffic shift.
Instance Method Summary collapse
-
#bind(scope) ⇒ AWSCDK::CodeDeploy::TrafficRoutingConfig
Returns the traffic routing configuration.
-
#initialize ⇒ TrafficRouting
constructor
A new instance of TrafficRouting.
Constructor Details
#initialize ⇒ TrafficRouting
Returns a new instance of TrafficRouting.
8 9 10 |
# File 'code_deploy/traffic_routing.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.all_at_once ⇒ AWSCDK::CodeDeploy::TrafficRouting
Shifts 100% of traffic in a single shift.
21 22 23 |
# File 'code_deploy/traffic_routing.rb', line 21 def self.all_at_once() Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codedeploy.TrafficRouting", "allAtOnce", []) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 |
# File 'code_deploy/traffic_routing.rb', line 12 def self.jsii_overridable_methods { :bind => { kind: :method, name: "bind", is_optional: false }, } end |
.time_based_canary(props) ⇒ AWSCDK::CodeDeploy::TrafficRouting
Shifts a specified percentage of traffic, waits for a specified amount of time, then shifts the rest of traffic.
29 30 31 32 33 |
# File 'code_deploy/traffic_routing.rb', line 29 def self.time_based_canary(props) props = props.is_a?(Hash) ? ::AWSCDK::CodeDeploy::TimeBasedCanaryTrafficRoutingProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWRlcGxveS5UaW1lQmFzZWRDYW5hcnlUcmFmZmljUm91dGluZ1Byb3BzIn0=")), "props") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codedeploy.TrafficRouting", "timeBasedCanary", [props]) end |
.time_based_linear(props) ⇒ AWSCDK::CodeDeploy::TrafficRouting
Keeps shifting a specified percentage of traffic until reaching 100%, waiting for a specified amount of time in between each traffic shift.
39 40 41 42 43 |
# File 'code_deploy/traffic_routing.rb', line 39 def self.time_based_linear(props) props = props.is_a?(Hash) ? ::AWSCDK::CodeDeploy::TimeBasedLinearTrafficRoutingProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWRlcGxveS5UaW1lQmFzZWRMaW5lYXJUcmFmZmljUm91dGluZ1Byb3BzIn0=")), "props") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codedeploy.TrafficRouting", "timeBasedLinear", [props]) end |
Instance Method Details
#bind(scope) ⇒ AWSCDK::CodeDeploy::TrafficRoutingConfig
Returns the traffic routing configuration.
49 50 51 52 |
# File 'code_deploy/traffic_routing.rb', line 49 def bind(scope) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") jsii_call_method("bind", [scope]) end |