Create a connection type

 

Updated: May 26, 2016

The Create a connection type task creates a defines a set of user-defined fields, similar to a class.

You can think of connections as instances of connection types, with values for the fields that you defined in the connection type. Connection types can also be created by importing Microsoft Azure Automation integration modules.

To specify the request, replace {subscription-id} with your subscription ID, {resource-group-name} with the name of your resource group, {automation-account-name} with the name of the automation account, and {connection-type-name} with the name of the connection.

Method

Request URI

PUT

https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.Automation/automationAccounts/{automation-account-name}/connectionTypes/{connection-type-name}?api-version=2015-10-31

URI parameter

Description

api-version

Required. Valid values include 2015-10-31

The following code shows an example of the request body.

{
   "name":"LitwareTwitter",
   "properties":{
      "isGlobal":false,
      "fieldDefinitions":{
         "Owner":{
            "isEncrypted":false,
            "isOptional":false,
            "type":"System.String"
         },
         "ConsuerAPIKey":{
            "isEncrypted":true,
            "isOptional":false,
            "type":"System.String"
         },
         "ConsuerAPISecret":{
            "isEncrypted":true,
            "isOptional":false,
            "type":"System.String"
         },
         "AccessToken":{
            "isEncrypted":true,
            "isOptional":false,
            "type":"System.String"
         },
         "AccessTokenSecret":{
            "isEncrypted":true,
            "isOptional":false,
            "type":"System.String"
         }
      }
   }
}

Element

Description

Name

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

Description (Optional)

A description of the connection.

Connection type name

The name of the connection's connection type.

Field definition values

The required fields and their values required by the connection type.

The following code shows an example of the response body.

{
   "name":"LitwareTwitter",
   "properties":{
      "isGlobal":false,
      "fieldDefinitions":{
         "Owner":{
            "isEncrypted":false,
            "isOptional":false,
            "type":"System.String"
         },
         "ConsuerAPIKey":{
            "isEncrypted":true,
            "isOptional":false,
            "type":"System.String"
         },
         "ConsuerAPISecret":{
            "isEncrypted":true,
            "isOptional":false,
            "type":"System.String"
         },
         "AccessToken":{
            "isEncrypted":true,
            "isOptional":false,
            "type":"System.String"
         },
         "AccessTokenSecret":{
            "isEncrypted":true,
            "isOptional":false,
            "type":"System.String"
         }
      },
      "creationTime":"2015-05-18T07:11:31.71+00:00",
      "lastModifiedTime":"2015-05-18T07:11:31.71+00:00"
   }
}



201

For information about common error codes, see Service Management Status and Error Codes

Show: