Class: AWSCDK::Cognito::CfnUserPool::SmsConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cognito/cfn_user_pool.rb

Overview

User pool configuration for delivery of SMS messages with Amazon Simple Notification Service.

To send SMS messages with Amazon SNS in the AWS Region that you want, the Amazon Cognito user pool uses an AWS Identity and Access Management (IAM) role in your AWS account .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(external_id: nil, sns_caller_arn: nil, sns_region: nil) ⇒ SmsConfigurationProperty

Returns a new instance of SmsConfigurationProperty.

Parameters:

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

    The external ID provides additional security for your IAM role.

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

    The Amazon Resource Name (ARN) of the Amazon SNS caller.

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

    The AWS Region to use with Amazon SNS integration.



2055
2056
2057
2058
2059
2060
2061
2062
# File 'cognito/cfn_user_pool.rb', line 2055

def initialize(external_id: nil, sns_caller_arn: nil, sns_region: nil)
  @external_id = external_id
  Jsii::Type.check_type(@external_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "externalId") unless @external_id.nil?
  @sns_caller_arn = sns_caller_arn
  Jsii::Type.check_type(@sns_caller_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "snsCallerArn") unless @sns_caller_arn.nil?
  @sns_region = sns_region
  Jsii::Type.check_type(@sns_region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "snsRegion") unless @sns_region.nil?
end

Instance Attribute Details

#external_idString? (readonly)

The external ID provides additional security for your IAM role.

You can use an ExternalId with the IAM role that you use with Amazon SNS to send SMS messages for your user pool. If you provide an ExternalId , your Amazon Cognito user pool includes it in the request to assume your IAM role. You can configure the role trust policy to require that Amazon Cognito, and any principal, provide the ExternalID . If you use the Amazon Cognito Management Console to create a role for SMS multi-factor authentication (MFA), Amazon Cognito creates a role with the required permissions and a trust policy that demonstrates use of the ExternalId .

For more information about the ExternalId of a role, see How to use an external ID when granting access to your AWS resources to a third party .



2072
2073
2074
# File 'cognito/cfn_user_pool.rb', line 2072

def external_id
  @external_id
end

#sns_caller_arnString? (readonly)

The Amazon Resource Name (ARN) of the Amazon SNS caller.

This is the ARN of the IAM role in your AWS account that Amazon Cognito will use to send SMS messages. SMS messages are subject to a spending limit .



2079
2080
2081
# File 'cognito/cfn_user_pool.rb', line 2079

def sns_caller_arn
  @sns_caller_arn
end

#sns_regionString? (readonly)

The AWS Region to use with Amazon SNS integration.

You can choose the same Region as your user pool, or a supported Legacy Amazon SNS alternate Region .

Amazon Cognito resources in the Asia Pacific (Seoul) AWS Region must use your Amazon SNS configuration in the Asia Pacific (Tokyo) Region. For more information, see SMS message settings for Amazon Cognito user pools .



2088
2089
2090
# File 'cognito/cfn_user_pool.rb', line 2088

def sns_region
  @sns_region
end

Class Method Details

.jsii_propertiesObject



2090
2091
2092
2093
2094
2095
2096
# File 'cognito/cfn_user_pool.rb', line 2090

def self.jsii_properties
  {
    :external_id => "externalId",
    :sns_caller_arn => "snsCallerArn",
    :sns_region => "snsRegion",
  }
end

Instance Method Details

#to_jsiiObject



2098
2099
2100
2101
2102
2103
2104
2105
2106
# File 'cognito/cfn_user_pool.rb', line 2098

def to_jsii
  result = {}
  result.merge!({
    "externalId" => @external_id,
    "snsCallerArn" => @sns_caller_arn,
    "snsRegion" => @sns_region,
  })
  result.compact
end