diff --git a/plugins/aws/plugin.go b/plugins/aws/plugin.go index a19eeca1..05a6494e 100644 --- a/plugins/aws/plugin.go +++ b/plugins/aws/plugin.go @@ -18,6 +18,7 @@ func New() schema.Plugin { Executables: []schema.Executable{ AWSCLI(), AWSCDKToolkit(), + AWSSAMCLI(), }, } } diff --git a/plugins/aws/sam.go b/plugins/aws/sam.go new file mode 100644 index 00000000..b53cb688 --- /dev/null +++ b/plugins/aws/sam.go @@ -0,0 +1,26 @@ +package aws + +import ( + "github.com/1Password/shell-plugins/sdk" + "github.com/1Password/shell-plugins/sdk/needsauth" + "github.com/1Password/shell-plugins/sdk/schema" + "github.com/1Password/shell-plugins/sdk/schema/credname" +) + +func AWSSAMCLI() schema.Executable { + return schema.Executable{ + Name: "AWS SAM CLI", + Runs: []string{"sam"}, + DocsURL: sdk.URL("https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/reference-sam-cli.html"), + NeedsAuth: needsauth.IfAll( + needsauth.NotForHelpOrVersion(), + needsauth.NotWithoutArgs(), + ), + Uses: []schema.CredentialUsage{ + { + Name: credname.AccessKey, + Provisioner: CLIProvisioner{}, + }, + }, + } +}