Class: AWSCDK::DevOpsAgent::CfnAssociation::AWSResourceProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
dev_ops_agent/cfn_association.rb

Overview

Defines an AWS resource to be monitored, including its type, ARN, and optional metadata.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource_arn:, resource_metadata: nil, resource_type: nil) ⇒ AWSResourceProperty

Returns a new instance of AWSResourceProperty.

Parameters:

  • resource_arn (String)

    The Amazon Resource Name (ARN) of the resource.

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

    Additional metadata specific to the resource.

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

    Resource type.



633
634
635
636
637
638
639
640
# File 'dev_ops_agent/cfn_association.rb', line 633

def initialize(resource_arn:, resource_metadata: nil, resource_type: nil)
  @resource_arn = resource_arn
  Jsii::Type.check_type(@resource_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceArn")
  @resource_metadata = 
  Jsii::Type.check_type(@resource_metadata, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "resourceMetadata") unless @resource_metadata.nil?
  @resource_type = resource_type
  Jsii::Type.check_type(@resource_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceType") unless @resource_type.nil?
end

Instance Attribute Details

#resource_arnString (readonly)

The Amazon Resource Name (ARN) of the resource.



646
647
648
# File 'dev_ops_agent/cfn_association.rb', line 646

def resource_arn
  @resource_arn
end

#resource_metadataObject? (readonly)

Additional metadata specific to the resource.

This is an optional JSON object that can include resource-specific information to provide additional context for monitoring and management.



653
654
655
# File 'dev_ops_agent/cfn_association.rb', line 653

def 
  @resource_metadata
end

#resource_typeString? (readonly)

Resource type.



658
659
660
# File 'dev_ops_agent/cfn_association.rb', line 658

def resource_type
  @resource_type
end

Class Method Details

.jsii_propertiesObject



660
661
662
663
664
665
666
# File 'dev_ops_agent/cfn_association.rb', line 660

def self.jsii_properties
  {
    :resource_arn => "resourceArn",
    :resource_metadata => "resourceMetadata",
    :resource_type => "resourceType",
  }
end

Instance Method Details

#to_jsiiObject



668
669
670
671
672
673
674
675
676
# File 'dev_ops_agent/cfn_association.rb', line 668

def to_jsii
  result = {}
  result.merge!({
    "resourceArn" => @resource_arn,
    "resourceMetadata" => @resource_metadata,
    "resourceType" => @resource_type,
  })
  result.compact
end