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=2023-11-01

URI Parameters

Name In Required Type Description
automationAccountName
path True

string

The name of the automation account.

connectionName
path True

string

The parameters supplied to the create or update connection operation.

resourceGroupName
path True

string

Name of an Azure Resource group.

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

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.

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

ConnectionTypeAssociationProperty

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

Connection

OK

201 Created

Connection

Created

Other Status Codes

ErrorResponse

Automation error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

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=2023-11-01

{
  "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": "/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"
    }
  }
}

Definitions

Name Description
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

ConnectionTypeAssociationProperty

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

ConnectionTypeAssociationProperty

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.