Class: AWSCDK::SecretsManager::CfnSecretTargetAttachmentProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
secrets_manager/cfn_secret_target_attachment_props.rb

Overview

Properties for defining a CfnSecretTargetAttachment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(secret_id:, target_id:, target_type:) ⇒ CfnSecretTargetAttachmentProps

Returns a new instance of CfnSecretTargetAttachmentProps.

Parameters:

  • secret_id (String)

    The ARN or name of the secret.

  • target_id (String)

    The ID of the database or cluster.

  • target_type (String)

    A string that defines the type of service or database associated with the secret.



12
13
14
15
16
17
18
19
# File 'secrets_manager/cfn_secret_target_attachment_props.rb', line 12

def initialize(secret_id:, target_id:, target_type:)
  @secret_id = secret_id
  Jsii::Type.check_type(@secret_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "secretId")
  @target_id = target_id
  Jsii::Type.check_type(@target_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetId")
  @target_type = target_type
  Jsii::Type.check_type(@target_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetType")
end

Instance Attribute Details

#secret_idString (readonly)

The ARN or name of the secret.

To reference a secret also created in this template, use the see Ref function with the secret's logical ID. This field is unique for each target attachment definition.



27
28
29
# File 'secrets_manager/cfn_secret_target_attachment_props.rb', line 27

def secret_id
  @secret_id
end

#target_idString (readonly)

The ID of the database or cluster.



32
33
34
# File 'secrets_manager/cfn_secret_target_attachment_props.rb', line 32

def target_id
  @target_id
end

#target_typeString (readonly)

A string that defines the type of service or database associated with the secret.

This value instructs Secrets Manager how to update the secret with the details of the service or database. This value must be one of the following:

  • AWS::RDS::DBInstance
  • AWS::RDS::DBCluster
  • AWS::Redshift::Cluster
  • AWS::RedshiftServerless::Namespace
  • AWS::DocDB::DBInstance
  • AWS::DocDB::DBCluster
  • AWS::DocDBElastic::Cluster


47
48
49
# File 'secrets_manager/cfn_secret_target_attachment_props.rb', line 47

def target_type
  @target_type
end

Class Method Details

.jsii_propertiesObject



49
50
51
52
53
54
55
# File 'secrets_manager/cfn_secret_target_attachment_props.rb', line 49

def self.jsii_properties
  {
    :secret_id => "secretId",
    :target_id => "targetId",
    :target_type => "targetType",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "secretId" => @secret_id,
    "targetId" => @target_id,
    "targetType" => @target_type,
  })
  result.compact
end