- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我需要创建 Azure 自动化帐户,并且我想在自动化帐户下创建运行手册以自动调度 VM
使用API创建云服务 https://management.core.windows.net/sdjgsdgj-abcd-2323-98cd-3bd6bcf93702/cloudServices/cloudsername
下一步,我将使用上面的 API 在创建的云服务下创建 Azure 自动化帐户。 https://management.core.windows.net/sdjgsdgj-abcd-2323-98cd-3bd6bcf93702/cloudServices/cloudsername/resources/automation/AutomationAccount/testacc2?resourceType=AutomationAccount&detailLevel=Full&resourceProviderNamespace=automation '
之后,我想在创建自动化帐户下创建 Runbook,为此我在 Python 中使用以下 API
import adal
import requests
import json
token_response = adal.acquire_token_with_username_password(
'https://login.windows.net/rapiddirectory.onmicrosoft.com',
'<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="dbafbea8af9ba3a2a1f5b4b5b6b2b8a9b4a8b4bdaff5b8b4b6" rel="noreferrer noopener nofollow">[email protected]</a>',
'abcd'
)
access_token = token_response.get('accessToken')
create_run_draft = 'https://management.core.windows.net/sdjgsdgj-abcd-2323-98cd-3bd6bcf93702/cloudServices/cloudsername/resources/automation/~/automationAccounts/testacc2/runbooks/write-helloworld/draft?api-version=2014-12-08'
param3 = {
"tags":{
"Testing":"show value",
"Source":"TechNet Script Center"
},
"properties":{
"description":"Hello world",
"runbookType":"Script",
"logProgress":"false",
"logVerbose":"false",
"draft":{
"draftContentLink":{
"uri":"https://gallery.technet.microsoft.com/scriptcenter/The-Hello-World-of-Windows-81b69574/file/111354/1/Write-HelloWorld.ps1",
"contentVersion":"1.0.0.0",
"contentHash":{
"algorithm":"sha256",
"value":"EqdfsYoVzERQZ3l69N55y1RcYDwkib2+2X+aGUSdr4Q="
}
}
}
}
}
headers2 = {'x-ms-version' : '2013-06-01','Content-Type' : 'application/json',"Authorization": 'Bearer ' + access_token}
output = requests.put(create_run_draft,headers=headers2,data=param3).text
print output
我正在使用 Python 编程语言来为 Azure REST API 实现此目的
我收到以下错误
<Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.
org/2001/XMLSchema-instance"><Code>InternalError</Code><Message>The server encou
ntered an internal error. Please retry the request.</Message></Error>
请帮助我解决这个问题,我正在努力解决错误
最佳答案
可能是因为您将 logProgress 和 logVerbose 的值作为字符串 ("false"
) 而不是 bool 值 (false
) 传递。
这对我有用:
创建运行手册:
PUT https://management.core.windows.net/90751b51-7cb6-4480-8dbd-e199395b296f/cloudservices/OaaSCS/resources/automation/~/automationAccounts/JoeAutomationAccount/runbooks/testabc?api-version =2014-12-08
请求正文:
{
“特性”: {
“logVerbose”:假,
“日志进度”:假,
"runbookType": "脚本",
“草稿”: {
“编辑中”:假,
"创建时间": "0001-01-01T00:00:00+00:00",
“最后修改时间”:“0001-01-01T00:00:00+00:00”
}
},
“名称”:“testabc”
}
上传草稿内容:
PUT https://management.core.windows.net/90751b51-7cb6-4480-8dbd-e199395b296f/cloudservices/OaaSCS/resources/automation/~/automationAccounts/JoeAutomationAccount/runbooks/testabc/draft/content ?api-version=2014-12-08
请求正文:
工作流程 testabc {
“你好”
}
关于python - 在 python 中使用 azure REST api 将 Runbook 创建为草稿时,我遇到了错误...!,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37279493/
我一直在从事一个需要内容的草稿/实时版本的项目,并想到了如下设计: Article ID Creator CreationDate DraftContent(fk to
这是我的第一个问题,如果我做错了什么,请告诉我... 我目前正在用 Java 制作一个草稿游戏。事实上,除了 AI 之外,一切正常。AI 目前是单线程的,使用 minimax 和 alpha-beta
我一直在 Delphi 下使用 Indy 通过 gmail 帐户发送消息,使用 TIdSMTP 和 TIdMessage 组件。这绝对没问题。 但是,我的客户请求将消息保存到 DRAFTS 文件夹,以
我有一个简单的 IBackgroundTask执行查询然后根据特定项目是否存在执行插入或一个或多个更新的实现。但是,更新没有持久化,我不明白为什么。新项目按预期创建。 我正在更新的内容项有 Commo
我的部分应用程序功能是自动填写 Gmail 邮件主题、文本、收件人并附上照片。但是当我退出 gmail Intent 而不发送邮件时,我不想将此邮件保存为草稿。 如何禁止在从我的应用程序开始意向之前保
我正在尝试使用 facebook 的 Draft-JS 框架实现一个编辑器,该框架将被限制为 50 个字符的行。 我不希望使用 css 换行,我希望它们在达到 50 个字符的限制时真正分成单独的 bl
我正在编写一个应该同时支持 draft 17 的小型 WebSocket 服务器应用程序和较旧的变体,例如 draft 00 .我对最新的草稿没有任何问题,但我无法让草稿 00 的客户满意。 出于测试
我正在使用 Facebook 的 Draft.js 库创建富文本框,我需要将文本框的插入符号设为红色。可能吗? 我已阅读有关 -webkit-text-fill-color 属性的内容,但它使键入的文
我正在使用 Gmail API 在 Python 中自动创建 Gmail 草稿。我需要创建 HTML 格式的电子邮件,但我个人也需要创建纯文本回退,因为这是正确的做法。 我以为我已经完成了上述所有工作
从官方文档我知道了 2 种方法:通过键获取实体和获取最后创建的实体。就我而言,我还需要一种方法来访问当前 ContentState 中的所有实体。有什么方法可以执行此操作吗?如果没有,是否有一个可以提
我有一个难题要解决。 Here is my sample project 基本上我想创建一个可编辑的类似书本的容器,并且由于每个书页都是另一个容器,所以我不知道如何在页面充满文本后让编辑器从一个页面过
按此 SO thread我应该能够使用格式如下的超链接直接转到使用 Gmail REST API 创建的 Gmail 草稿邮件: https://mail.google.com/mail/#draft
我一直在尝试弄清楚如何自动将收件人添加到通过他们的 Ruby 库使用 Gmail API 创建的草稿电子邮件。我可以毫无问题地创建草稿,但设置收件人给我带来了麻烦,而且我一直无法找到任何好的示例来展示
是否有文档解释如何在将内容粘贴到 Draft.js 中时保留段落分隔符?其他格式看起来很合理,但粘贴时所有段落 block 都会折叠成单个段落 block 。 最佳答案 您可以使用编辑器的 Prop
我正在构建一个基于draft-js的扩展编辑器来添加脚注功能。在主编辑器中编写文本时,用户可以选择单击“添加脚注”,这会在当前选择处添加脚注标记(带有注释编号的徽章),并打开辅助编辑器,在其中编写文本
我总是使用 Gmail 来保存网页剪辑或笔记。我只需创建一封新邮件,对其进行编辑并另存为草稿。两年多来,我已将 1000 多封邮件转储到 Gmail 草稿文件夹中。我想以编程方式将它们全部发送给自己。
N4791 - 2018-12-07(这与 [basic.start.static]/2 的 current draft 中的措辞一致) Constant initialization is perf
我正在尝试使用 C# 在 winforms 应用程序中生成 Gmail 草稿邮件。消息草稿需要采用 HTML 格式并能够包含附件。 我能够使用 AE.Net.Mail 生成带有附件的草稿,但草稿邮件是
我正在使用来自 their website 的 paypal 创建发票样本 json 我得到了一个足够好的 token ,我将其与帖子一起提交,因为错误不是 401 Unauthorized 而是 4
我是一名优秀的程序员,十分优秀!