GENERATE TEMPLATE

Syntax

GENERATE TEMPLATE WITH (template_parameter = value [, ...]);

Description

This command generates an AWS CloudFormation template to be used in an AWS environment.

Arguments

WITH (template_parameter = value [, …​ ])

This clause specifies Template Parameters and any other template specific parameters mentioned below.

Template Parameters

Parameter NameDescription

type

Type of the CloudFormation template to generate.

Required: Yes Valid values: KAFKA_IAM_ROLE, KINESIS_IAM_ROLE. Type: String

access_region

Region the template will be valid for. Required: Yes Valid values: See LIST REGIONS

Type: String

Kafka IAM Template Parameters

Parameter NameDescription

template.msk.allows.topic.prefixes.create

List of comma separated topic prefixs to allow creating, e.g. 'ds_'

Required: No Type: String

template.msk.allows.topic.prefixes.delete

List of comma separated topic prefixs to allow deleting, e.g. 'ds_'

Required: No Type: String

template.msk.allows.topic.prefixes.read

List of comma separated topic prefixs to allow reading, e.g. 'my*'

Required: No Type: String

template.msk.allows.topic.prefixes.write

List of comma separated topic prefixs to allow writing, e.g. 'ds_'

Required: No Type: String

template.msk.cluster.arn

The Amazon Resource Name (ARN) that uniquely identifies the MSK cluster. Required: Yes Type: String

Kinesis IAM Template Parameters

Parameter NameDescription

template.kinesis.allows.streams.read

List of comma separated name of data streams to give read access. This accepts wildcards in the names as well, e.g. deliveries,shipment*

Required: No Type: String

template.kinesis.allows.streams.write

List of comma separated name of data streams to give write access.

Required: No Type: String

template.kinesis.allows.streams.create

List of comma separated name of data streams to allow creating.

Required: No Type: String

template.kinesis.allows.streams.delete

List of comma separated name of data streams to allow deleting.

Required: No Type: String

template.kinesis.allows.streams.list

List of comma separated name of data streams to allow deleting. Accepts wildcard as well, e.g. my*

Required: No Type: String

template.kinesis.aws_account

AWS account ID number for the template is valid for. Required: No Type: String

template.kinesis.aws_region

AWS region name the template is valid for, e.g. us-east-2. Required: No Type: String

Examples

Create a Kafka IAM role template

demodb.public/demostore# GENERATE TEMPLATE
WITH (
  'type' = KAFKA_IAM_ROLE,
  'access_region' = "AWS us-east-1" ,
  'template.msk.allows.topic.prefixes.create' = 'ds_' ,
  'template.msk.allows.topic.prefixes.delete' = 'ds_' ,
  'template.msk.allows.topic.prefixes.read' = '*' ,
  'template.msk.allows.topic.prefixes.write' = 'ds_' ,
  'template.msk.cluster.arn' = 'arn:aws:kafka:us-east-1:0123456789019:cluster/SalesCluster/abcd1234-abcd-cafe-abab-9876543210ab-4' );
[ CloudFormation template ]

Create a Kinesis IAM role template

demodb.public/demostore# GENERATE TEMPLATE
WITH (
  'type' = KINESIS_IAM_ROLE,
  'access_region' = "AWS us-east-1",
  'template.kinesis.allows.streams.read' = 'deliveries,shipment*',
  'template.kinesis.allows.streams.write' = 'issueswrite',
  'template.kinesis.allows.streams.create' = 'issuescreate',
  'template.kinesis.allows.streams.delete' = 'issuesdelete',
  'template.kinesis.allows.streams.list' = 'my*',
  'template.kinesis.aws_account' = '854977439775',
  'template.kinesis.aws_region' = 'us-east-2'
  );
[ CloudFormation template ]

Last updated