Class: AWSCDK::Greengrass::CfnResourceDefinition::ResourceInstanceProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Greengrass::CfnResourceDefinition::ResourceInstanceProperty
- Defined in:
- greengrass/cfn_resource_definition.rb
Overview
A local resource, machine learning resource, or secret resource.
For more information, see Access Local Resources with Lambda Functions , Perform Machine Learning Inference , and Deploy Secrets to the AWS IoT Greengrass Core in the Developer Guide .
In an CloudFormation template, the Resources property of the AWS::Greengrass::ResourceDefinition resource contains a list of ResourceInstance property types.
Instance Attribute Summary collapse
-
#id ⇒ String
readonly
A descriptive or arbitrary ID for the resource.
-
#name ⇒ String
readonly
The descriptive resource name, which is displayed on the AWS IoT Greengrass console.
-
#resource_data_container ⇒ AWSCDK::IResolvable, AWSCDK::Greengrass::CfnResourceDefinition::ResourceDataContainerProperty
readonly
A container for resource data.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, name:, resource_data_container:) ⇒ ResourceInstanceProperty
constructor
A new instance of ResourceInstanceProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(id:, name:, resource_data_container:) ⇒ ResourceInstanceProperty
Returns a new instance of ResourceInstanceProperty.
933 934 935 936 937 938 939 940 |
# File 'greengrass/cfn_resource_definition.rb', line 933 def initialize(id:, name:, resource_data_container:) @id = id Jsii::Type.check_type(@id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") @name = name Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") @resource_data_container = resource_data_container.is_a?(Hash) ? ::AWSCDK::Greengrass::CfnResourceDefinition::ResourceDataContainerProperty.new(**resource_data_container.transform_keys(&:to_sym)) : resource_data_container Jsii::Type.check_type(@resource_data_container, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ncmVlbmdyYXNzLkNmblJlc291cmNlRGVmaW5pdGlvbi5SZXNvdXJjZURhdGFDb250YWluZXJQcm9wZXJ0eSJ9XX19")), "resourceDataContainer") end |
Instance Attribute Details
#id ⇒ String (readonly)
A descriptive or arbitrary ID for the resource.
This value must be unique within the resource definition version. Maximum length is 128 characters with pattern [a-zA-Z0-9:_-]+ .
948 949 950 |
# File 'greengrass/cfn_resource_definition.rb', line 948 def id @id end |
#name ⇒ String (readonly)
The descriptive resource name, which is displayed on the AWS IoT Greengrass console.
Maximum length 128 characters with pattern [a-zA-Z0-9:_-]+. This must be unique within a Greengrass group.
955 956 957 |
# File 'greengrass/cfn_resource_definition.rb', line 955 def name @name end |
#resource_data_container ⇒ AWSCDK::IResolvable, AWSCDK::Greengrass::CfnResourceDefinition::ResourceDataContainerProperty (readonly)
A container for resource data.
The container takes only one of the following supported resource data types: LocalDeviceResourceData , LocalVolumeResourceData , SageMakerMachineLearningModelResourceData , S3MachineLearningModelResourceData , or SecretsManagerSecretResourceData .
Only one resource type can be defined for a
ResourceDataContainerinstance.
964 965 966 |
# File 'greengrass/cfn_resource_definition.rb', line 964 def resource_data_container @resource_data_container end |
Class Method Details
.jsii_properties ⇒ Object
966 967 968 969 970 971 972 |
# File 'greengrass/cfn_resource_definition.rb', line 966 def self.jsii_properties { :id => "id", :name => "name", :resource_data_container => "resourceDataContainer", } end |
Instance Method Details
#to_jsii ⇒ Object
974 975 976 977 978 979 980 981 982 |
# File 'greengrass/cfn_resource_definition.rb', line 974 def to_jsii result = {} result.merge!({ "id" => @id, "name" => @name, "resourceDataContainer" => @resource_data_container, }) result.compact end |