Class: AWSCDK::Greengrassv2::CfnDeployment::DeploymentComponentUpdatePolicyProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
greengrassv2/cfn_deployment.rb

Overview

Contains information about a deployment's policy that defines when components are safe to update.

Each component on a device can report whether or not it's ready to update. After a component and its dependencies are ready, they can apply the update in the deployment. You can configure whether or not the deployment notifies components of an update and waits for a response. You specify the amount of time each component has to respond to the update notification.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action: nil, timeout_in_seconds: nil) ⇒ DeploymentComponentUpdatePolicyProperty

Returns a new instance of DeploymentComponentUpdatePolicyProperty.

Parameters:

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

    Whether or not to notify components and wait for components to become safe to update.

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

    The amount of time in seconds that each component on a device has to report that it's safe to update.



797
798
799
800
801
802
# File 'greengrassv2/cfn_deployment.rb', line 797

def initialize(action: nil, timeout_in_seconds: nil)
  @action = action
  Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "action") unless @action.nil?
  @timeout_in_seconds = timeout_in_seconds
  Jsii::Type.check_type(@timeout_in_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "timeoutInSeconds") unless @timeout_in_seconds.nil?
end

Instance Attribute Details

#actionString? (readonly)

Whether or not to notify components and wait for components to become safe to update.

Choose from the following options:

  • NOTIFY_COMPONENTS – The deployment notifies each component before it stops and updates that component. Components can use the SubscribeToComponentUpdates IPC operation to receive these notifications. Then, components can respond with the DeferComponentUpdate IPC operation. For more information, see the Create deployments in the AWS IoT Greengrass V2 Developer Guide .
  • SKIP_NOTIFY_COMPONENTS – The deployment doesn't notify components or wait for them to be safe to update.

Default: NOTIFY_COMPONENTS



815
816
817
# File 'greengrassv2/cfn_deployment.rb', line 815

def action
  @action
end

#timeout_in_secondsNumeric? (readonly)

The amount of time in seconds that each component on a device has to report that it's safe to update.

If the component waits for longer than this timeout, then the deployment proceeds on the device.

Default: 60



824
825
826
# File 'greengrassv2/cfn_deployment.rb', line 824

def timeout_in_seconds
  @timeout_in_seconds
end

Class Method Details

.jsii_propertiesObject



826
827
828
829
830
831
# File 'greengrassv2/cfn_deployment.rb', line 826

def self.jsii_properties
  {
    :action => "action",
    :timeout_in_seconds => "timeoutInSeconds",
  }
end

Instance Method Details

#to_jsiiObject



833
834
835
836
837
838
839
840
# File 'greengrassv2/cfn_deployment.rb', line 833

def to_jsii
  result = {}
  result.merge!({
    "action" => @action,
    "timeoutInSeconds" => @timeout_in_seconds,
  })
  result.compact
end