Class: AWSCDK::ResilienceHub::CfnApp::ResourceMappingProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
resilience_hub/cfn_app.rb

Overview

Defines a resource mapping.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mapping_type:, physical_resource_id:, eks_source_name: nil, logical_stack_name: nil, resource_name: nil, terraform_source_name: nil) ⇒ ResourceMappingProperty

Returns a new instance of ResourceMappingProperty.

Parameters:

  • mapping_type (String)

    Specifies the type of resource mapping.

  • physical_resource_id (AWSCDK::IResolvable, AWSCDK::ResilienceHub::CfnApp::PhysicalResourceIdProperty)

    Identifier of the physical resource.

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

    Name of the Amazon Elastic Kubernetes Service cluster and namespace that this resource is mapped to when the mappingType is EKS .

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

    Name of the CloudFormation stack this resource is mapped to when the mappingType is CfnStack .

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

    Name of the resource that this resource is mapped to when the mappingType is Resource .

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

    Name of the Terraform source that this resource is mapped to when the mappingType is Terraform .



852
853
854
855
856
857
858
859
860
861
862
863
864
865
# File 'resilience_hub/cfn_app.rb', line 852

def initialize(mapping_type:, physical_resource_id:, eks_source_name: nil, logical_stack_name: nil, resource_name: nil, terraform_source_name: nil)
  @mapping_type = mapping_type
  Jsii::Type.check_type(@mapping_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "mappingType")
  @physical_resource_id = physical_resource_id.is_a?(Hash) ? ::AWSCDK::ResilienceHub::CfnApp::PhysicalResourceIdProperty.new(**physical_resource_id.transform_keys(&:to_sym)) : physical_resource_id
  Jsii::Type.check_type(@physical_resource_id, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19yZXNpbGllbmNlaHViLkNmbkFwcC5QaHlzaWNhbFJlc291cmNlSWRQcm9wZXJ0eSJ9XX19")), "physicalResourceId")
  @eks_source_name = eks_source_name
  Jsii::Type.check_type(@eks_source_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "eksSourceName") unless @eks_source_name.nil?
  @logical_stack_name = logical_stack_name
  Jsii::Type.check_type(@logical_stack_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "logicalStackName") unless @logical_stack_name.nil?
  @resource_name = resource_name
  Jsii::Type.check_type(@resource_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "resourceName") unless @resource_name.nil?
  @terraform_source_name = terraform_source_name
  Jsii::Type.check_type(@terraform_source_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "terraformSourceName") unless @terraform_source_name.nil?
end

Instance Attribute Details

#eks_source_nameString? (readonly)

Name of the Amazon Elastic Kubernetes Service cluster and namespace that this resource is mapped to when the mappingType is EKS .

This parameter accepts values in "eks-cluster/namespace" format.



883
884
885
# File 'resilience_hub/cfn_app.rb', line 883

def eks_source_name
  @eks_source_name
end

#logical_stack_nameString? (readonly)

Name of the CloudFormation stack this resource is mapped to when the mappingType is CfnStack .



888
889
890
# File 'resilience_hub/cfn_app.rb', line 888

def logical_stack_name
  @logical_stack_name
end

#mapping_typeString (readonly)

Specifies the type of resource mapping.



871
872
873
# File 'resilience_hub/cfn_app.rb', line 871

def mapping_type
  @mapping_type
end

#resource_nameString? (readonly)

Name of the resource that this resource is mapped to when the mappingType is Resource .



893
894
895
# File 'resilience_hub/cfn_app.rb', line 893

def resource_name
  @resource_name
end

#terraform_source_nameString? (readonly)

Name of the Terraform source that this resource is mapped to when the mappingType is Terraform .



898
899
900
# File 'resilience_hub/cfn_app.rb', line 898

def terraform_source_name
  @terraform_source_name
end

Class Method Details

.jsii_propertiesObject



900
901
902
903
904
905
906
907
908
909
# File 'resilience_hub/cfn_app.rb', line 900

def self.jsii_properties
  {
    :mapping_type => "mappingType",
    :physical_resource_id => "physicalResourceId",
    :eks_source_name => "eksSourceName",
    :logical_stack_name => "logicalStackName",
    :resource_name => "resourceName",
    :terraform_source_name => "terraformSourceName",
  }
end

Instance Method Details

#to_jsiiObject



911
912
913
914
915
916
917
918
919
920
921
922
# File 'resilience_hub/cfn_app.rb', line 911

def to_jsii
  result = {}
  result.merge!({
    "mappingType" => @mapping_type,
    "physicalResourceId" => @physical_resource_id,
    "eksSourceName" => @eks_source_name,
    "logicalStackName" => @logical_stack_name,
    "resourceName" => @resource_name,
    "terraformSourceName" => @terraform_source_name,
  })
  result.compact
end