Class: AWSCDK::Greengrass::CfnGroupProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
greengrass/cfn_group_props.rb

Overview

Properties for defining a CfnGroup.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, initial_version: nil, role_arn: nil, tags: nil) ⇒ CfnGroupProps

Returns a new instance of CfnGroupProps.

Parameters:

  • name (String)

    The name of the group.

  • initial_version (AWSCDK::IResolvable, AWSCDK::Greengrass::CfnGroup::GroupVersionProperty, nil) (defaults to: nil)

    The group version to include when the group is created.

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

    The Amazon Resource Name (ARN) of the IAM role attached to the group.

  • tags (Object, nil) (defaults to: nil)

    Application-specific metadata to attach to the group.



13
14
15
16
17
18
19
20
21
22
# File 'greengrass/cfn_group_props.rb', line 13

def initialize(name:, initial_version: nil, role_arn: nil, tags: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @initial_version = initial_version.is_a?(Hash) ? ::AWSCDK::Greengrass::CfnGroup::GroupVersionProperty.new(**initial_version.transform_keys(&:to_sym)) : initial_version
  Jsii::Type.check_type(@initial_version, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ncmVlbmdyYXNzLkNmbkdyb3VwLkdyb3VwVmVyc2lvblByb3BlcnR5In1dfX0=")), "initialVersion") unless @initial_version.nil?
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn") unless @role_arn.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "tags") unless @tags.nil?
end

Instance Attribute Details

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

The group version to include when the group is created.

A group version references the Amazon Resource Name (ARN) of a core definition version, device definition version, subscription definition version, and other version types. The group version must reference a core definition version that contains one core. Other version types are optionally included, depending on your business need.

To associate a group version after the group is created, create an AWS::Greengrass::GroupVersion resource and specify the ID of this group.



37
38
39
# File 'greengrass/cfn_group_props.rb', line 37

def initial_version
  @initial_version
end

#nameString (readonly)

The name of the group.



28
29
30
# File 'greengrass/cfn_group_props.rb', line 28

def name
  @name
end

#role_arnString? (readonly)

The Amazon Resource Name (ARN) of the IAM role attached to the group.

This role contains the permissions that Lambda functions and connectors use to interact with other AWS services.



44
45
46
# File 'greengrass/cfn_group_props.rb', line 44

def role_arn
  @role_arn
end

#tagsObject? (readonly)

Application-specific metadata to attach to the group.

You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see Tagging Your AWS IoT Greengrass Resources in the Developer Guide .

This Json property type is processed as a map of key-value pairs. It uses the following format, which is different from most Tags implementations in CloudFormation templates.

"Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value"
}


58
59
60
# File 'greengrass/cfn_group_props.rb', line 58

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



60
61
62
63
64
65
66
67
# File 'greengrass/cfn_group_props.rb', line 60

def self.jsii_properties
  {
    :name => "name",
    :initial_version => "initialVersion",
    :role_arn => "roleArn",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



69
70
71
72
73
74
75
76
77
78
# File 'greengrass/cfn_group_props.rb', line 69

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "initialVersion" => @initial_version,
    "roleArn" => @role_arn,
    "tags" => @tags,
  })
  result.compact
end