Class: AWSCDK::Greengrass::CfnResourceDefinitionVersion::ResourceInstanceProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
greengrass/cfn_resource_definition_version.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::ResourceDefinitionVersion resource contains a list of ResourceInstance property types.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id:, name:, resource_data_container:) ⇒ ResourceInstanceProperty

Returns a new instance of ResourceInstanceProperty.

Parameters:



812
813
814
815
816
817
818
819
# File 'greengrass/cfn_resource_definition_version.rb', line 812

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::CfnResourceDefinitionVersion::ResourceDataContainerProperty.new(**resource_data_container.transform_keys(&:to_sym)) : resource_data_container
  Jsii::Type.check_type(@resource_data_container, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ncmVlbmdyYXNzLkNmblJlc291cmNlRGVmaW5pdGlvblZlcnNpb24uUmVzb3VyY2VEYXRhQ29udGFpbmVyUHJvcGVydHkifV19fQ==")), "resourceDataContainer")
end

Instance Attribute Details

#idString (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:_-]+ .



827
828
829
# File 'greengrass/cfn_resource_definition_version.rb', line 827

def id
  @id
end

#nameString (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.



834
835
836
# File 'greengrass/cfn_resource_definition_version.rb', line 834

def name
  @name
end

#resource_data_containerAWSCDK::IResolvable, AWSCDK::Greengrass::CfnResourceDefinitionVersion::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 ResourceDataContainer instance.



843
844
845
# File 'greengrass/cfn_resource_definition_version.rb', line 843

def resource_data_container
  @resource_data_container
end

Class Method Details

.jsii_propertiesObject



845
846
847
848
849
850
851
# File 'greengrass/cfn_resource_definition_version.rb', line 845

def self.jsii_properties
  {
    :id => "id",
    :name => "name",
    :resource_data_container => "resourceDataContainer",
  }
end

Instance Method Details

#to_jsiiObject



853
854
855
856
857
858
859
860
861
# File 'greengrass/cfn_resource_definition_version.rb', line 853

def to_jsii
  result = {}
  result.merge!({
    "id" => @id,
    "name" => @name,
    "resourceDataContainer" => @resource_data_container,
  })
  result.compact
end