Class: AWSCDK::QuickSight::CfnDataSource::RedshiftIAMParametersProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
quick_sight/cfn_data_source.rb

Overview

A structure that grants Quick Sight access to your cluster and make a call to the redshift:GetClusterCredentials API.

For more information on the redshift:GetClusterCredentials API, see GetClusterCredentials .

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(role_arn:, auto_create_database_user: nil, database_groups: nil, database_user: nil) ⇒ RedshiftIAMParametersProperty

Returns a new instance of RedshiftIAMParametersProperty.

Parameters:

  • role_arn (String)

    Use the RoleArn structure to allow Quick Sight to call redshift:GetClusterCredentials on your cluster.

  • auto_create_database_user (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Automatically creates a database user.

  • database_groups (Array<String>, nil) (defaults to: nil)

    A list of groups whose permissions will be granted to Quick Sight to access the cluster.

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

    The user whose permissions and group memberships will be used by Quick Sight to access the cluster.



1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
# File 'quick_sight/cfn_data_source.rb', line 1912

def initialize(role_arn:, auto_create_database_user: nil, database_groups: nil, database_user: nil)
  @role_arn = role_arn
  Jsii::Type.check_type(@role_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "roleArn")
  @auto_create_database_user = auto_create_database_user
  Jsii::Type.check_type(@auto_create_database_user, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "autoCreateDatabaseUser") unless @auto_create_database_user.nil?
  @database_groups = database_groups
  Jsii::Type.check_type(@database_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "databaseGroups") unless @database_groups.nil?
  @database_user = database_user
  Jsii::Type.check_type(@database_user, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "databaseUser") unless @database_user.nil?
end

Instance Attribute Details

#auto_create_database_userBoolean, ... (readonly)

Note:

Default: - false

Automatically creates a database user.

If your database doesn't have a DatabaseUser , set this parameter to True . If there is no DatabaseUser , Quick Sight can't connect to your cluster. The RoleArn that you use for this operation must grant access to redshift:CreateClusterUser to successfully create the user.



1937
1938
1939
# File 'quick_sight/cfn_data_source.rb', line 1937

def auto_create_database_user
  @auto_create_database_user
end

#database_groupsArray<String>? (readonly)

A list of groups whose permissions will be granted to Quick Sight to access the cluster.

These permissions are combined with the permissions granted to Quick Sight by the DatabaseUser . If you choose to include this parameter, the RoleArn must grant access to redshift:JoinGroup .



1944
1945
1946
# File 'quick_sight/cfn_data_source.rb', line 1944

def database_groups
  @database_groups
end

#database_userString? (readonly)

The user whose permissions and group memberships will be used by Quick Sight to access the cluster.

If this user already exists in your database, Amazon Quick Sight is granted the same permissions that the user has. If the user doesn't exist, set the value of AutoCreateDatabaseUser to True to create a new user with PUBLIC permissions.



1951
1952
1953
# File 'quick_sight/cfn_data_source.rb', line 1951

def database_user
  @database_user
end

#role_arnString (readonly)

Use the RoleArn structure to allow Quick Sight to call redshift:GetClusterCredentials on your cluster.

The calling principal must have iam:PassRole access to pass the role to Quick Sight. The role's trust policy must allow the Quick Sight service principal to assume the role.



1929
1930
1931
# File 'quick_sight/cfn_data_source.rb', line 1929

def role_arn
  @role_arn
end

Class Method Details

.jsii_propertiesObject



1953
1954
1955
1956
1957
1958
1959
1960
# File 'quick_sight/cfn_data_source.rb', line 1953

def self.jsii_properties
  {
    :role_arn => "roleArn",
    :auto_create_database_user => "autoCreateDatabaseUser",
    :database_groups => "databaseGroups",
    :database_user => "databaseUser",
  }
end

Instance Method Details

#to_jsiiObject



1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
# File 'quick_sight/cfn_data_source.rb', line 1962

def to_jsii
  result = {}
  result.merge!({
    "roleArn" => @role_arn,
    "autoCreateDatabaseUser" => @auto_create_database_user,
    "databaseGroups" => @database_groups,
    "databaseUser" => @database_user,
  })
  result.compact
end