AWS Slack Chatbot: Difference between revisions

From SWKLS WIKI
Jump to navigation Jump to search
(Created page with "=AWS Chatbot Command Examples= ==LightSail== ===List Instance Names=== <syntaxhighlight lang="bash"> @aws lightsail get-instances --query Instances[*].Name --region us-east-...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
=AWS Chatbot Command Examples=
=AWS Chatbot Command Examples=
The AWS Chatbot in Slack is limited to informational queries. For example, you cannot reboot a LightSail instance via the AWS Chatbot. The JSON output will be slightly different to that of the normal AWS CLI. This is important to note as the inputs in the --query area may be different than expected. For example, AWS Chatbot may show 'PublicIpAddress' while the AWS CLI show 'publicIpAddress' (the word 'public' is capitalized when accessing AWS Chatbot).


==LightSail==
==LightSail==
Line 6: Line 8:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
@aws lightsail get-instances --query Instances[*].Name --region us-east-1  
@aws lightsail get-instances --query Instances[*].Name --region us-east-1  
</syntaxhighlight>
===List Instance Names - Extended Information===
<syntaxhighlight lang="bash">
@aws lightsail get-instances --query Instances[*].[Name,PublicIpAddress,BlueprintId] --region us-east-1
</syntaxhighlight>
===List Single Instance Info===
<syntaxhighlight lang="bash">
@aws lightsail get-instance --instance-name swkls-sandbox-nano
</syntaxhighlight>
</syntaxhighlight>



Latest revision as of 15:53, 23 October 2020

AWS Chatbot Command Examples

The AWS Chatbot in Slack is limited to informational queries. For example, you cannot reboot a LightSail instance via the AWS Chatbot. The JSON output will be slightly different to that of the normal AWS CLI. This is important to note as the inputs in the --query area may be different than expected. For example, AWS Chatbot may show 'PublicIpAddress' while the AWS CLI show 'publicIpAddress' (the word 'public' is capitalized when accessing AWS Chatbot).

LightSail

List Instance Names

@aws lightsail get-instances --query Instances[*].Name --region us-east-1

List Instance Names - Extended Information

@aws lightsail get-instances --query Instances[*].[Name,PublicIpAddress,BlueprintId] --region us-east-1

List Single Instance Info

@aws lightsail get-instance --instance-name swkls-sandbox-nano