当前位置:网站首页>[azure developer] how to generate connection & certificate when azure automation automates account generation

[azure developer] how to generate connection & certificate when azure automation automates account generation

2021-10-14 05:08:12 Two roadside lights

Azure Automation :The Azure Automation service provides a highly reliable and scalable workflow execution engine to automate frequently repeated management tasks. The processes are automated through runbooks, which are Windows PowerShell Workflows run in the Azure Automation execution engine. You can use this API to create, update, read, and delete automation resources, including runbooks and runbook jobs. In addition you can manage assets such as variables, schedules, Windows PowerShell modules, credentials, and certificates.

Azure Automation services provide a highly reliable and scalable workflow execution engine , It can automatically perform frequently repeated management tasks . These processes pass through runbook Done automatically , these runbook Is in Azure Automate the execution of Windows PowerShell workflow . You can use this API To create 、 to update 、 Read and delete automation resources , Include runbook and runbook Homework . Besides , You can also manage variables such as 、 schedule 、Windows PowerShell modular 、 Assets such as credentials and certificates .

Source : https://docs.microsoft.com/en-us/rest/api/automation/

 

Problem description

Automated account ( Automation Account ) How to generate a connection when generating ( Connection ) And certificates ( Certificate )?

 

I want to answer

In China Azure Created in Connection when , It needs to be changed to... In China ARM Endpoint. such as Connection Of Endpoint ( endpoints ) Should be :

https://management.chinacloudapi.cn
/subscriptions/<subscriptionid>
/resourceGroups/< resourceGroups >/providers/Microsoft.Automation
/automationAccounts/< automationAccounts name>
/connections/<connectionname>?api-version=2015-10-31

Examples of requests can be found in :https://docs.microsoft.com/en-us/rest/api/automation/connection/create-or-update#create-or-update-connection

Sample Request

PUT https://management.chinacloudapi.cn/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts
/myAutomationAccount28/connections/mysConnection?api-version=2015-10-31

Request Body

{
  "name": "mysConnection",
  "properties": {
    "description": "my description goes here",
    "connectionType": {
      "name": "Azure"
    },
    "fieldDefinitionValues": {
      "AutomationCertificateName": "mysCertificateName",
      "SubscriptionID": "subid"
    }
  }
}

Sample Response

  • Status code:201

Reference material

Automation REST API Reference: https://docs.microsoft.com/en-us/rest/api/automation/

 

版权声明
本文为[Two roadside lights]所创,转载请带上原文链接,感谢
https://chowdera.com/2021/10/20211002145410653q.html

随机推荐