Connection - Create Or Update

Create or update a connection.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName}?api-version=2015-10-31

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

resourceGroupName
path True
  • string

Name of an Azure Resource group.

Regex pattern: ^[-\w\._]+$

automationAccountName
path True
  • string

The name of the automation account.

connectionName
path True
  • string

The parameters supplied to the create or update connection operation.

api-version
query True
  • string

Client Api Version.

Request Body

Name Required Type Description
name True
  • string

Gets or sets the name of the connection.

properties.connectionType True

Gets or sets the connectionType of the connection.

properties.description
  • string

Gets or sets the description of the connection.

properties.fieldDefinitionValues
  • object

Gets or sets the field definition properties of the connection.

Responses

Name Type Description
200 OK

OK

201 Created

Created

Other Status Codes

Automation error response describing why the operation failed.

Examples

Create or update connection

Sample Request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/mysConnection?api-version=2015-10-31
{
  "name": "mysConnection",
  "properties": {
    "description": "my description goes here",
    "connectionType": {
      "name": "Azure"
    },
    "fieldDefinitionValues": {
      "AutomationCertificateName": "mysCertificateName",
      "SubscriptionID": "subid"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg/providers/Microsoft.Automation/automationAccounts/myAutomationAccount28/connections/mysConnection",
  "name": "mysConnection",
  "properties": {
    "creationTime": "2017-03-27T07:52:29.29+00:00",
    "lastModifiedTime": "2017-03-27T07:52:29.29+00:00",
    "description": "my description goes here",
    "fieldDefinitionValues": {
      "AutomationCertificateName": "mysCertificateName",
      "SubscriptionID": "subid"
    },
    "connectionType": {
      "name": "Azure"
    }
  }
}
{
  "id": null,
  "name": "mysConnection",
  "properties": {
    "creationTime": "2017-03-27T07:52:29.29+00:00",
    "lastModifiedTime": "2017-03-27T07:52:29.29+00:00",
    "description": "my description goes here",
    "fieldDefinitionValues": {
      "AutomationCertificateName": "mysCertificateName",
      "SubscriptionID": "subid"
    },
    "connectionType": {
      "name": "Azure"
    }
  }
}

Definitions

Connection

Definition of the connection.

ConnectionCreateOrUpdateParameters

The parameters supplied to the create or update connection operation.

ConnectionTypeAssociationProperty

The connection type property associated with the entity.

ErrorResponse

Error response of an operation failure

Connection

Definition of the connection.

Name Type Description
id
  • string

Fully qualified resource Id for the resource

name
  • string

The name of the resource

properties.connectionType

Gets or sets the connectionType of the connection.

properties.creationTime
  • string

Gets the creation time.

properties.description
  • string

Gets or sets the description.

properties.fieldDefinitionValues
  • object

Gets the field definition values of the connection.

properties.lastModifiedTime
  • string

Gets the last modified time.

type
  • string

The type of the resource.

ConnectionCreateOrUpdateParameters

The parameters supplied to the create or update connection operation.

Name Type Description
name
  • string

Gets or sets the name of the connection.

properties.connectionType

Gets or sets the connectionType of the connection.

properties.description
  • string

Gets or sets the description of the connection.

properties.fieldDefinitionValues
  • object

Gets or sets the field definition properties of the connection.

ConnectionTypeAssociationProperty

The connection type property associated with the entity.

Name Type Description
name
  • string

Gets or sets the name of the connection type.

ErrorResponse

Error response of an operation failure

Name Type Description
code
  • string

Error code

message
  • string

Error message indicating why the operation failed.