Listing Resources with Prism
All types of prismatic resources (customers, components, integrations, instances, actions, etc.) have :list
subcommands.
By default, list commands show basic information about the resource, like name and description, but additional information like resource ID can be displayed.
You can optionally select exactly what attributes of resources you want to list, you can filter the results, and you can format the results as CSV, JSON, or YAML.
prism components:list
Label Public Description Version Category
─────────────────────── ────── ───────────────────────────────────────────────────────────────────────────────────────────── ─────── ──────────────────────
Acme ERP false Interact with Acme ERP's inventory and customer systems 2 null
Airtable true Manage items (records) in an Airtable Base 2 Data Platforms
Amazon DynamoDB true Create, update, fetch, or delete items in an Amazon (AWS) DynamoDB database 5 Data Platforms
Amazon S3 true Manage files within an Amazon (AWS) S3 bucket 34 Data Platforms
Amazon SES true Send Emails through Amazon (AWS) SES 5 Application Connectors
Amazon SNS true Manage subscriptions, topics, and messages within Amazon (AWS) SNS 7 Data Platforms
Amazon SQS true Send, receive and manage messages within an Amazon (AWS) SQS queue 10 Data Platforms
AMQP true Send and receive messages on an AMQP-based message broker 5 Data Platforms
Listing Resource IDs
All Prismatic resources have unique IDs.
IDs are not displayed by default through list
subcommands, but can optionally be displayed with the --extended
flag.
For example, to see IDs for components, run
prism components:list --extended
Id Key Label Public Description Version Category
──────────────────────────────────────────────────────────────── ─────────────────────── ─────────────────────── ────── ───────────────────────────────────────────────────────────────────────────────────────────── ─────── ──────────────────────
Q29tcG9uZW50OjI3ZWM4ODlmLTI1ODUtNDFiMy05MDdlLWI2YWExNTg5ZGNhNA== acmeerp Acme ERP false Interact with Acme ERP's inventory and customer systems 2 null
Q29tcG9uZW50OmVkMjcwNmExLThiMTEtNDI0YS05MjM0LTgzZjU4NDBmNzA3NQ== airtable Airtable true Manage items (records) in an Airtable Base 2 Data Platforms
Q29tcG9uZW50Ojg3NzE3YThhLTFiODktNDY5My1hYmZlLWRjY2VkMjMxM2RlZg== aws-dynamodb Amazon DynamoDB true Create, update, fetch, or delete items in an Amazon (AWS) DynamoDB database 5 Data Platforms
Q29tcG9uZW50OjE3NmRjYWU3LWEzMzktNDQ2NC1iYmJkLTU4ODllNzdmOWJjYQ== aws-s3 Amazon S3 true Manage files within an Amazon (AWS) S3 bucket 34 Data Platforms
Q29tcG9uZW50Ojg3NjlhODE1LTY1OTEtNDliZC1hMGQ5LTNhMWNlYjUxZmZkYQ== aws-ses Amazon SES true Send Emails through Amazon (AWS) SES 5 Application Connectors
Q29tcG9uZW50OjNkMzFkYjYxLWFlYzItNDRjZS05NGNkLTVhZWJjMjIxNjlhZg== aws-sns Amazon SNS true Manage subscriptions, topics, and messages within Amazon (AWS) SNS 7 Data Platforms
Q29tcG9uZW50OmQ5ZmJkYzViLTFhMGUtNDRlMS1hNDcxLTNjMWE0NzFhYzAwNQ== aws-sqs Amazon SQS true Send, receive and manage messages within an Amazon (AWS) SQS queue 10 Data Platforms
Q29tcG9uZW50OmFmYjNlMTNmLTg0NDctNGJmMC05MWIyLTAxNGQ1OTliYThkYg== amqp AMQP true Send and receive messages on an AMQP-based message broker 5 Data Platforms
Configuring Columns of a List to Display
You can optionally choose which attributes of a resource to display using the --columns
flag.
For example, to get the Key, Label, and ID of all components, you can run
prism components:list --columns key,label,id
Key Label Id
──────────── ─────────────── ────────────────────────────────────────────────────────────────
acmeerp Acme ERP Q29tcG9uZW50OjI3ZWM4ODlmLTI1ODUtNDFiMy05MDdlLWI2YWExNTg5ZGNhNA==
airtable Airtable Q29tcG9uZW50OmVkMjcwNmExLThiMTEtNDI0YS05MjM0LTgzZjU4NDBmNzA3NQ==
aws-dynamodb Amazon DynamoDB Q29tcG9uZW50Ojg3NzE3YThhLTFiODktNDY5My1hYmZlLWRjY2VkMjMxM2RlZg==
aws-s3 Amazon S3 Q29tcG9uZW50OjE3NmRjYWU3LWEzMzktNDQ2NC1iYmJkLTU4ODllNzdmOWJjYQ==
aws-ses Amazon SES Q29tcG9uZW50Ojg3NjlhODE1LTY1OTEtNDliZC1hMGQ5LTNhMWNlYjUxZmZkYQ==
aws-sns Amazon SNS Q29tcG9uZW50OjNkMzFkYjYxLWFlYzItNDRjZS05NGNkLTVhZWJjMjIxNjlhZg==
aws-sqs Amazon SQS Q29tcG9uZW50OmQ5ZmJkYzViLTFhMGUtNDRlMS1hNDcxLTNjMWE0NzFhYzAwNQ==
amqp AMQP Q29tcG9uZW50OmFmYjNlMTNmLTg0NDctNGJmMC05MWIyLTAxNGQ1OTliYThkYg==
Filtering List Output
You can filter the output that a :list
subcommand displays using a --filter
flag.
For example, to only show the component with the key "aws-s3", run
prism components:list --filter 'key=^aws-s3$'
Label Public Description Version Category
───────── ────── ───────────────────────────────────────────── ─────── ──────────────
Amazon S3 true Manage files within an Amazon (AWS) S3 bucket 34 Data Platforms
The --filter
flag uses regex pattern matching, hence the "start of string" ^
character, and "end of string" $
character.
In a bash script, you can combine the --filter
flag with the --columns
and --no-header
flags to get the ID of a specific resource
AWS_S3_COMPONENT_ID=$(prism components:list --filter 'key=aws-s3' --no-header --columns id)
echo ${AWS_S3_COMPONENT_ID}
Q29tcG9uZW50OjJlMDcyMGU4LTFjNTUtNDY1Ni04NzY0LTI1N2RmZDVhNTE3Mw==
Formatting List Output
Lists can be optionally formatted as CSV, JSON, or YAML using the --output
flag.
This flag can be combined with the --columns FORMAT
and --filter
flag, as well.
For example, if you want id and key of all components in CSV format, run
prism components:list --output csv --columns id,key
Id,Key
Q29tcG9uZW50OjNiODQ1NGVkLTE5MjEtNGYxNS04MDhmLTBlZjkxNDEzNGRhZA==,airtable
Q29tcG9uZW50OjE5YWYzMzQzLTU2OWQtNDY0Yy1iNTAwLWUzM2RhNjg3YmQxYQ==,aws-dynamodb
Q29tcG9uZW50OjQ1ZGVkMzEyLTE2ZmUtNGY0Mi04OWVlLWZhOTIzNTQ0ZDEyYQ==,aws-s3
Q29tcG9uZW50OmEyNjRjMTVkLThjM2QtNGY0Yi1hNDNkLWEzYzMzZjgxZGY0MQ==,aws-ses
Q29tcG9uZW50OjRmNTM5MWVkLWE3ZDEtNDljZi1hNjViLTE4ZGNmMTRmNGJlMA==,aws-sns
Q29tcG9uZW50OmQ0YjhmOTllLWU3YTYtNDUxMS04YWIxLWNkOGQ1M2QyNDJiZg==,aws-sqs