Class: AWSCDK::IoT::CfnProvisioningTemplateProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
io_t/cfn_provisioning_template_props.rb

Overview

Properties for defining a CfnProvisioningTemplate.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(provisioning_role_arn:, template_body:, description: nil, enabled: nil, pre_provisioning_hook: nil, tags: nil, template_name: nil, template_type: nil) ⇒ CfnProvisioningTemplateProps

Returns a new instance of CfnProvisioningTemplateProps.

Parameters:

  • provisioning_role_arn (String, AWSCDK::Interfaces::AWSIAM::IRoleRef)

    The role ARN for the role associated with the fleet provisioning template.

  • template_body (String)

    The JSON formatted contents of the fleet provisioning template version.

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

    The description of the fleet provisioning template.

  • enabled (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    True to enable the fleet provisioning template, otherwise false.

  • pre_provisioning_hook (AWSCDK::IResolvable, AWSCDK::IoT::CfnProvisioningTemplate::ProvisioningHookProperty, nil) (defaults to: nil)

    Creates a pre-provisioning hook template.

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

    Metadata that can be used to manage the fleet provisioning template.

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

    The name of the fleet provisioning template.

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

    The type of the provisioning template.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'io_t/cfn_provisioning_template_props.rb', line 17

def initialize(provisioning_role_arn:, template_body:, description: nil, enabled: nil, pre_provisioning_hook: nil, tags: nil, template_name: nil, template_type: nil)
  @provisioning_role_arn = provisioning_role_arn
  Jsii::Type.check_type(@provisioning_role_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifV19fQ==")), "provisioningRoleArn")
  @template_body = template_body
  Jsii::Type.check_type(@template_body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateBody")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @enabled = enabled
  Jsii::Type.check_type(@enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "enabled") unless @enabled.nil?
  @pre_provisioning_hook = pre_provisioning_hook.is_a?(Hash) ? ::AWSCDK::IoT::CfnProvisioningTemplate::ProvisioningHookProperty.new(**pre_provisioning_hook.transform_keys(&:to_sym)) : pre_provisioning_hook
  Jsii::Type.check_type(@pre_provisioning_hook, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuUHJvdmlzaW9uaW5nVGVtcGxhdGUuUHJvdmlzaW9uaW5nSG9va1Byb3BlcnR5In1dfX0=")), "preProvisioningHook") unless @pre_provisioning_hook.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?
  @template_name = template_name
  Jsii::Type.check_type(@template_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateName") unless @template_name.nil?
  @template_type = template_type
  Jsii::Type.check_type(@template_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateType") unless @template_type.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

The description of the fleet provisioning template.



52
53
54
# File 'io_t/cfn_provisioning_template_props.rb', line 52

def description
  @description
end

#enabledBoolean, ... (readonly)

True to enable the fleet provisioning template, otherwise false.



57
58
59
# File 'io_t/cfn_provisioning_template_props.rb', line 57

def enabled
  @enabled
end

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

Creates a pre-provisioning hook template.



62
63
64
# File 'io_t/cfn_provisioning_template_props.rb', line 62

def pre_provisioning_hook
  @pre_provisioning_hook
end

#provisioning_role_arnString, AWSCDK::Interfaces::AWSIAM::IRoleRef (readonly)

The role ARN for the role associated with the fleet provisioning template.

This IoT role grants permission to provision a device.



42
43
44
# File 'io_t/cfn_provisioning_template_props.rb', line 42

def provisioning_role_arn
  @provisioning_role_arn
end

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

Metadata that can be used to manage the fleet provisioning template.



67
68
69
# File 'io_t/cfn_provisioning_template_props.rb', line 67

def tags
  @tags
end

#template_bodyString (readonly)

The JSON formatted contents of the fleet provisioning template version.



47
48
49
# File 'io_t/cfn_provisioning_template_props.rb', line 47

def template_body
  @template_body
end

#template_nameString? (readonly)

The name of the fleet provisioning template.



72
73
74
# File 'io_t/cfn_provisioning_template_props.rb', line 72

def template_name
  @template_name
end

#template_typeString? (readonly)

The type of the provisioning template.



77
78
79
# File 'io_t/cfn_provisioning_template_props.rb', line 77

def template_type
  @template_type
end

Class Method Details

.jsii_propertiesObject



79
80
81
82
83
84
85
86
87
88
89
90
# File 'io_t/cfn_provisioning_template_props.rb', line 79

def self.jsii_properties
  {
    :provisioning_role_arn => "provisioningRoleArn",
    :template_body => "templateBody",
    :description => "description",
    :enabled => "enabled",
    :pre_provisioning_hook => "preProvisioningHook",
    :tags => "tags",
    :template_name => "templateName",
    :template_type => "templateType",
  }
end

Instance Method Details

#to_jsiiObject



92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'io_t/cfn_provisioning_template_props.rb', line 92

def to_jsii
  result = {}
  result.merge!({
    "provisioningRoleArn" => @provisioning_role_arn,
    "templateBody" => @template_body,
    "description" => @description,
    "enabled" => @enabled,
    "preProvisioningHook" => @pre_provisioning_hook,
    "tags" => @tags,
    "templateName" => @template_name,
    "templateType" => @template_type,
  })
  result.compact
end