当我尝试根据状态机定义创建状态机时,出现以下错误:
botocore.exceptions.ClientError: An error occurred (AccessDeniedException) when calling the CreateStateMachine operation: 'role' is not authorized to create managed-rule.
Run Code Online (Sandbox Code Playgroud)
创建代码:
state_machine = sfn_client.create_state_machine(
name = 'state-machine',
definition = state_machine_def,
roleArn = SFN_ROLE,
)
Run Code Online (Sandbox Code Playgroud)
我使用的 IAM 角色包含此处所述的所有必要权限。它需要拥有创建什么样的托管规则的权限?
我有这段代码:
config_object = yaml.safe_load(config_string)
print("passed config: {}".format(config_object))
^^ prints expected yaml structure
print("deserialized config object type: {}".format(type(config_object)))
^^ prints deserialized config object type: <class 'str'>
value = config_object["field1"]["field2"]["field3"]
^^ Error: string indices must be integers
Run Code Online (Sandbox Code Playgroud)
我的 yaml 配置:
---
field1:
field2:
field3: value
field4: value
...
Run Code Online (Sandbox Code Playgroud)
我不明白为什么返回字符串。我在这里没有看到任何字符串返回类型:https ://pyyaml.org/wiki/PyYAMLDocumentation
我的 maven-jar-plugin 有以下根配置:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<excludes>
<exclude>com/company/project/staging/*</exclude>
</excludes>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
我想使用以下配置覆盖 Maven 配置文件中的此配置:
<profile>
<id>staging</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<includes>
<include>**/**</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Run Code Online (Sandbox Code Playgroud)
但是,配置文件配置不会覆盖根配置,因此 com/company/project/staging/ 包仍然被排除在外。在的帮助下
mvn 帮助:所有配置文件
命令我可以清楚地看到我的个人资料处于活动状态。知道为什么它不能像我期望的那样工作吗?非常感谢任何帮助。