我正在使用aws sdk,并想使用get_command_invocation method。这是我根据文档所拥有的:
resp = client.send_command(
instance_ids: [instance_id],document_name: 'AWS-RunShellScript',max_concurrency: '1',max_errors: '1',timeout_seconds: 60,parameters:
{ commands:
[command]
}
)
command_id = client.get_command_invocation(
command_id: resp.command.command_id,instance_id: instance_id
)
我使用puts
可以肯定该方法正在接收command_id和instance_id,当我尝试在aws控制台上查看它们时,它们都存在。但是我一直遇到:
(Aws::SSM::Errors::invocationDoesnotExist)
/Users/me/.rvm/gems/ruby-2.5.3/gems/aws-sdk-core-3.103.0/lib/seahorse/client/plugins/raise_response_errors.rb:17:in `call'
/Users/me/.rvm/gems/ruby-2.5.3/gems/aws-sdk-core-3.103.0/lib/aws-sdk-core/plugins/jsonvalue_converter.rb:22:in `call'
/Users/me/.rvm/gems/ruby-2.5.3/gems/aws-sdk-core-3.103.0/lib/aws-sdk-core/plugins/idempotency_token.rb:19:in `call'
/Users/me/.rvm/gems/ruby-2.5.3/gems/aws-sdk-core-3.103.0/lib/aws-sdk-core/plugins/param_converter.rb:26:in `call'
/Users/me/.rvm/gems/ruby-2.5.3/gems/aws-sdk-core-3.103.0/lib/aws-sdk-core/plugins/response_paging.rb:12:in `call'
/Users/me/.rvm/gems/ruby-2.5.3/gems/aws-sdk-core-3.103.0/lib/seahorse/client/plugins/response_target.rb:24:in `call'
/Users/me/.rvm/gems/ruby-2.5.3/gems/aws-sdk-core-3.103.0/lib/seahorse/client/request.rb:72:in `send_request'
/Users/me/.rvm/gems/ruby-2.5.3/gems/aws-sdk-ssm-1.84.0/lib/aws-sdk-ssm/client.rb:4534:in `get_command_invocation'
我在做什么错了?