Class: AWSCDK::Connect::CfnPhoneNumberProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
connect/cfn_phone_number_props.rb

Overview

Properties for defining a CfnPhoneNumber.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target_arn:, country_code: nil, description: nil, prefix: nil, source_phone_number_arn: nil, tags: nil, type: nil) ⇒ CfnPhoneNumberProps

Returns a new instance of CfnPhoneNumberProps.

Parameters:

  • target_arn (String)

    The Amazon Resource Name (ARN) for Connect Customer instances or traffic distribution group that phone numbers are claimed to.

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

    The ISO country code.

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

    The description of the phone number.

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

    The prefix of the phone number. If provided, it must contain + as part of the country code.

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

    The claimed phone number ARN that was previously imported from the external service, such as AWS End User Messaging.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    The tags used to organize, track, or control access for this resource.

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

    The type of phone number.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'connect/cfn_phone_number_props.rb', line 16

def initialize(target_arn:, country_code: nil, description: nil, prefix: nil, source_phone_number_arn: nil, tags: nil, type: nil)
  @target_arn = target_arn
  Jsii::Type.check_type(@target_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "targetArn")
  @country_code = country_code
  Jsii::Type.check_type(@country_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "countryCode") unless @country_code.nil?
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @prefix = prefix
  Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix") unless @prefix.nil?
  @source_phone_number_arn = source_phone_number_arn
  Jsii::Type.check_type(@source_phone_number_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "sourcePhoneNumberArn") unless @source_phone_number_arn.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
  @type = type
  Jsii::Type.check_type(@type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "type") unless @type.nil?
end

Instance Attribute Details

#country_codeString? (readonly)

The ISO country code.



42
43
44
# File 'connect/cfn_phone_number_props.rb', line 42

def country_code
  @country_code
end

#descriptionString? (readonly)

The description of the phone number.



47
48
49
# File 'connect/cfn_phone_number_props.rb', line 47

def description
  @description
end

#prefixString? (readonly)

The prefix of the phone number. If provided, it must contain + as part of the country code.

Pattern : ^\\+[0-9]{1,15}



54
55
56
# File 'connect/cfn_phone_number_props.rb', line 54

def prefix
  @prefix
end

#source_phone_number_arnString? (readonly)

The claimed phone number ARN that was previously imported from the external service, such as AWS End User Messaging.

If it is from AWS End User Messaging, it looks like the ARN of the phone number that was imported from AWS End User Messaging.



61
62
63
# File 'connect/cfn_phone_number_props.rb', line 61

def source_phone_number_arn
  @source_phone_number_arn
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

The tags used to organize, track, or control access for this resource.

For example, { "tags": "key2":"value2" }.



68
69
70
# File 'connect/cfn_phone_number_props.rb', line 68

def tags
  @tags
end

#target_arnString (readonly)

The Amazon Resource Name (ARN) for Connect Customer instances or traffic distribution group that phone numbers are claimed to.



37
38
39
# File 'connect/cfn_phone_number_props.rb', line 37

def target_arn
  @target_arn
end

#typeString? (readonly)

The type of phone number.



73
74
75
# File 'connect/cfn_phone_number_props.rb', line 73

def type
  @type
end

Class Method Details

.jsii_propertiesObject



75
76
77
78
79
80
81
82
83
84
85
# File 'connect/cfn_phone_number_props.rb', line 75

def self.jsii_properties
  {
    :target_arn => "targetArn",
    :country_code => "countryCode",
    :description => "description",
    :prefix => "prefix",
    :source_phone_number_arn => "sourcePhoneNumberArn",
    :tags => "tags",
    :type => "type",
  }
end

Instance Method Details

#to_jsiiObject



87
88
89
90
91
92
93
94
95
96
97
98
99
# File 'connect/cfn_phone_number_props.rb', line 87

def to_jsii
  result = {}
  result.merge!({
    "targetArn" => @target_arn,
    "countryCode" => @country_code,
    "description" => @description,
    "prefix" => @prefix,
    "sourcePhoneNumberArn" => @source_phone_number_arn,
    "tags" => @tags,
    "type" => @type,
  })
  result.compact
end