Share via


Update a connection

 

The Update a connection operation updates a connection with the specified data.

Request

To specify the request, replace <subscription-id> with your subscription ID, <cloud-service-name> with the name of the cloud service to use for making the request, <automation-account-name> with the name of the automation account to use for making the request, and <connection-name> with the name of the connection to update. Include required URI parameters.

Method

Request URI

PATCH

https://management.core.windows.net/<subscription-id>/cloudServices/<cloud-service-name>/resources/automation/~/automationAccounts/<automation-account-name>/connections/<connection-name>?api-version=2014-12-08

URI Parameters

Parameter

Description

api-version

Required. Must be set to 2014-12-08.

Request Headers

The request headers in the following table are required.

Request Header

Description

Content-Type

Set to application/json. Do not include a specification for charset.

x-ms-version

Specifies the version of the operation. Set to 2013-06-01 or a later version.

Request Body

In this example, the Owner field is updated to Litware Datacenter. The other field values must be provided because they are mandatory fields according to the connection type.

{
   "name":"Twitter",
   "properties":{
      "fieldDefinitionValues":{
         "Owner":"Litware Datacenter",
         "ConsumerAPIKey":"Pv6bmBg5uE2xXBUPQP9tmyW/DDB15LJAoXiT6NJFymE=",
         "ConsumerAPISecret":"C2ziW4nwt06xLTE4F5yrEfM3WSKol1JIjf0TG5RPchF0SMUnig1eSZhd/ol5KDwnLAuSm34ctkSQcfm0zEvTPlddqFvPxgFOhfmU4qapDkjXyZ82ZCcjSqAbyiYQnlTJmszzKyTHUESccBcPihHJ0iYP0CTTIb5Brr/SiVM/hxscrKizWR5aTLSUON9ga6kGqerCPQnP4EyZls/NsbGfbx8xOEh3N+FFnRFqyu5BAMxwkRf5Aat6S40vvvRNR7naVD6Zg6zTnkqnGPVpeud2ayjfkBfRPWRKkinmIcCTUICI4YvYGTgNRqbUanpV8932+wZKW6GfbUOv/y8h3/01Aw==",
         "AccessToken":"asBcGOJsDE6r552BCT6rTbvBnkBP775KiFM0MNwgn2U=",
         "AccessTokenSecret":"8j7bUCcjhkK9W8SxhmSspvWMBxMysSZKt4xwelcgPEUQL2T4y3T+RKyrvfHLsP0zEPL77R62W0aTD6zt7Luueb7B9YZIFIBOt35UwRTXCKlzWP9SZj4RQKe/q6nKGB/tigFkGnhE1kqorao1+G/r3bizAQXCkONPh7Tr6v5yUFx+e8sxNJsbQodJk7/NUp23CxjuXXHmyEuicDExMwicTCBbY/SdjzhAkvc3q7PBSBat4ymJKB+KSrS4hogTa+3dcbJvtHU7mEymlPE3cUWRFu9XbsjGo7JDn3NOlKxZkX+5gFk4LlVtT7Mn4hPVAiCodDdnkvXSoEWuQ5qgU/ZA4Q=="
      }
   }
}

Element

Description

name

Name of the connection. Note that the name is also provided in the URI and they must match.

description

A description of the connection.

fieldDefinitionValues/name

The name of a field defined by the connection type.

fieldDefinitionValues/value

The current value for the field.

Response

Status Code

A successful operation returns 200 (OK). For information about common error codes, see HTTP/1.1 Status Code Definitions.

Response Headers

Request Header

Description

x-ms-request-id

A unique identifier for the current operation.

Response Body

{
   "name":"Twitter",
   "properties":{
      "creationTime":"2015-05-19T17:27:07.93+00:00",
      "lastModifiedTime":"2015-05-19T18:12:06.043+00:00",
      "description":"Twitter connection",
      "fieldDefinitionValues":{
         "Owner":"Litware Datacenter",
         "ConsumerAPIKey":null,
         "ConsumerAPISecret":null,
         "AccessToken":null,
         "AccessTokenSecret":null
      },
      "connectionType":{
         "name":"LitwareTwitter"
      }
   }
}

Element

Description

name

Name of the connection.

description

A description of the connection.

fieldDefinitionValues

Updated values. Encrypted values are returned as null.

creationTime

The date and time the connection was created.

lastModifiedTime

The date and time the connection was last modified.

See Also

Automation Connections
Operations on Automation