Class: AWSCDK::CfnMacroProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cfn_macro_props.rb

Overview

Properties for defining a CfnMacro.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(function_name:, name:, description: nil, log_group_name: nil, log_role_arn: nil) ⇒ CfnMacroProps

Returns a new instance of CfnMacroProps.

Parameters:

  • function_name (String)

    The Amazon Resource Name (ARN) of the underlying Lambda function that you want CloudFormation to invoke when the macro is run.

  • name (String)

    The name of the macro.

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

    A description of the macro.

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

    The CloudWatch Logs group to which CloudFormation sends error logging information when invoking the macro's underlying Lambda function.

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

    The ARN of the role CloudFormation should assume when sending log entries to CloudWatch Logs .



14
15
16
17
18
19
20
21
22
23
24
25
# File 'cfn_macro_props.rb', line 14

def initialize(function_name:, name:, description: nil, log_group_name: nil, log_role_arn: nil)
  @function_name = function_name
  Jsii::Type.check_type(@function_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "functionName")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @log_group_name = log_group_name
  Jsii::Type.check_type(@log_group_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logGroupName") unless @log_group_name.nil?
  @log_role_arn = log_role_arn
  Jsii::Type.check_type(@log_role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logRoleArn") unless @log_role_arn.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

A description of the macro.



43
44
45
# File 'cfn_macro_props.rb', line 43

def description
  @description
end

#function_nameString (readonly)

The Amazon Resource Name (ARN) of the underlying Lambda function that you want CloudFormation to invoke when the macro is run.



31
32
33
# File 'cfn_macro_props.rb', line 31

def function_name
  @function_name
end

#log_group_nameString? (readonly)

The CloudWatch Logs group to which CloudFormation sends error logging information when invoking the macro's underlying Lambda function.

This will be an existing CloudWatch Logs LogGroup. Neither CloudFormation or Lambda will create the group.



50
51
52
# File 'cfn_macro_props.rb', line 50

def log_group_name
  @log_group_name
end

#log_role_arnString? (readonly)

The ARN of the role CloudFormation should assume when sending log entries to CloudWatch Logs .



55
56
57
# File 'cfn_macro_props.rb', line 55

def log_role_arn
  @log_role_arn
end

#nameString (readonly)

The name of the macro.

The name of the macro must be unique across all macros in the account.



38
39
40
# File 'cfn_macro_props.rb', line 38

def name
  @name
end

Class Method Details

.jsii_propertiesObject



57
58
59
60
61
62
63
64
65
# File 'cfn_macro_props.rb', line 57

def self.jsii_properties
  {
    :function_name => "functionName",
    :name => "name",
    :description => "description",
    :log_group_name => "logGroupName",
    :log_role_arn => "logRoleArn",
  }
end

Instance Method Details

#to_jsiiObject



67
68
69
70
71
72
73
74
75
76
77
# File 'cfn_macro_props.rb', line 67

def to_jsii
  result = {}
  result.merge!({
    "functionName" => @function_name,
    "name" => @name,
    "description" => @description,
    "logGroupName" => @log_group_name,
    "logRoleArn" => @log_role_arn,
  })
  result.compact
end