什么是“hellostepfunc1"?在用于设置 AWS stepfunctions 的无服务器文档中? [英] What is "hellostepfunc1" in the serverless documenation for setup AWS stepfunctions?

查看:46
本文介绍了什么是“hellostepfunc1"?在用于设置 AWS stepfunctions 的无服务器文档中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在无服务器网站的这些文档中 - 如何使用无服务器管理您的 AWS Step FunctionsGiTHUB - serverless-step-函数,我们可以在serverless.yml文件中找到这个词hellostepfunc1:.我找不到对它的引用.我不明白它是什么,我找不到任何对它的引用,即使在状态机被创建到 AWS 之后也是如此.

In these documentation from the serverless website - How to manage your AWS Step Functions with Serverless and GiTHUb - serverless-step-functions, we can find this word hellostepfunc1: in the serverless.yml file. I could not find reference to it. I dont understand what is it, and I can't find any reference to it, even after the State Machine was created into AWS.

如果我删除它,我会收到以下错误

If I delete it I get the follow error

Cannot use 'in' operator to search for 'role' in myStateMachine

但是,如果我为 someName 更改它的名称,例如我没有错误,状态机将运行良好.

But if I change its name for someName for example I have no error and the State Machine will works good.

我可以假设它只是一个标识符,但我不确定.我在哪里可以找到它的参考资料?

I could assume it is only an identifier but I not sure. Where can I find reference to it?

推荐答案

这非常特定于 library 您正在使用的库以及它如何根据 name: 字段是否在 hellostepfunc1: 下提供来命名正在创建的状态机.

This is quite specific to the library you are using and how it names the statemachine which is getting created based upon whether the name: field is provided under the hellostepfunc1: or not.

看看测试用例 此处此处 更好地理解.

Have a look at the testcases here and here to understand better.

简而言之像 .yaml

In-short a .yaml like

stateMachines:
    hellostepfunc1:
        definition:
            Comment: 'comment 1'
            .....

具有状态机的名称,如 hellostepfunc1StepFunctionsStateMachine,因为未指定名称.

has name of statemachine like hellostepfunc1StepFunctionsStateMachine as no name was specified.

而对于像 .yaml 这样的

Whereas for a .yaml like

stateMachines:
    hellostepfunc1:
        name: 'alpha'
        definition:
            Comment: 'comment 1'
            .....

状态机的名称是 alpha,因为您指定了名称.

the name of statemachine is alpha as you had name was specified.

这篇关于什么是“hellostepfunc1"?在用于设置 AWS stepfunctions 的无服务器文档中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆