1. Packages
  2. Azure Classic
  3. API Docs
  4. automation
  5. ConnectionType

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.automation.ConnectionType

Explore with Pulumi AI

Manages anAutomation Connection Type.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("example", {
    name: "resourceGroup-example",
    location: "West Europe",
});
const example = azure.core.getClientConfig({});
const exampleAccount = new azure.automation.Account("example", {
    name: "account-example",
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    skuName: "Basic",
});
const exampleConnectionType = new azure.automation.ConnectionType("example", {
    name: "example",
    resourceGroupName: exampleResourceGroup.name,
    automationAccountName: exampleAccount.name,
    fields: [{
        name: "example",
        type: "string",
    }],
});
Copy
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("example",
    name="resourceGroup-example",
    location="West Europe")
example = azure.core.get_client_config()
example_account = azure.automation.Account("example",
    name="account-example",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku_name="Basic")
example_connection_type = azure.automation.ConnectionType("example",
    name="example",
    resource_group_name=example_resource_group.name,
    automation_account_name=example_account.name,
    fields=[{
        "name": "example",
        "type": "string",
    }])
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/automation"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleResourceGroup, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("resourceGroup-example"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		_, err = core.GetClientConfig(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
			Name:              pulumi.String("account-example"),
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			SkuName:           pulumi.String("Basic"),
		})
		if err != nil {
			return err
		}
		_, err = automation.NewConnectionType(ctx, "example", &automation.ConnectionTypeArgs{
			Name:                  pulumi.String("example"),
			ResourceGroupName:     exampleResourceGroup.Name,
			AutomationAccountName: exampleAccount.Name,
			Fields: automation.ConnectionTypeFieldArray{
				&automation.ConnectionTypeFieldArgs{
					Name: pulumi.String("example"),
					Type: pulumi.String("string"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var exampleResourceGroup = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "resourceGroup-example",
        Location = "West Europe",
    });

    var example = Azure.Core.GetClientConfig.Invoke();

    var exampleAccount = new Azure.Automation.Account("example", new()
    {
        Name = "account-example",
        Location = exampleResourceGroup.Location,
        ResourceGroupName = exampleResourceGroup.Name,
        SkuName = "Basic",
    });

    var exampleConnectionType = new Azure.Automation.ConnectionType("example", new()
    {
        Name = "example",
        ResourceGroupName = exampleResourceGroup.Name,
        AutomationAccountName = exampleAccount.Name,
        Fields = new[]
        {
            new Azure.Automation.Inputs.ConnectionTypeFieldArgs
            {
                Name = "example",
                Type = "string",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.automation.Account;
import com.pulumi.azure.automation.AccountArgs;
import com.pulumi.azure.automation.ConnectionType;
import com.pulumi.azure.automation.ConnectionTypeArgs;
import com.pulumi.azure.automation.inputs.ConnectionTypeFieldArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
            .name("resourceGroup-example")
            .location("West Europe")
            .build());

        final var example = CoreFunctions.getClientConfig();

        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
            .name("account-example")
            .location(exampleResourceGroup.location())
            .resourceGroupName(exampleResourceGroup.name())
            .skuName("Basic")
            .build());

        var exampleConnectionType = new ConnectionType("exampleConnectionType", ConnectionTypeArgs.builder()
            .name("example")
            .resourceGroupName(exampleResourceGroup.name())
            .automationAccountName(exampleAccount.name())
            .fields(ConnectionTypeFieldArgs.builder()
                .name("example")
                .type("string")
                .build())
            .build());

    }
}
Copy
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    name: example
    properties:
      name: resourceGroup-example
      location: West Europe
  exampleAccount:
    type: azure:automation:Account
    name: example
    properties:
      name: account-example
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      skuName: Basic
  exampleConnectionType:
    type: azure:automation:ConnectionType
    name: example
    properties:
      name: example
      resourceGroupName: ${exampleResourceGroup.name}
      automationAccountName: ${exampleAccount.name}
      fields:
        - name: example
          type: string
variables:
  example:
    fn::invoke:
      function: azure:core:getClientConfig
      arguments: {}
Copy

Create ConnectionType Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new ConnectionType(name: string, args: ConnectionTypeArgs, opts?: CustomResourceOptions);
@overload
def ConnectionType(resource_name: str,
                   args: ConnectionTypeArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def ConnectionType(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   automation_account_name: Optional[str] = None,
                   fields: Optional[Sequence[ConnectionTypeFieldArgs]] = None,
                   resource_group_name: Optional[str] = None,
                   is_global: Optional[bool] = None,
                   name: Optional[str] = None)
func NewConnectionType(ctx *Context, name string, args ConnectionTypeArgs, opts ...ResourceOption) (*ConnectionType, error)
public ConnectionType(string name, ConnectionTypeArgs args, CustomResourceOptions? opts = null)
public ConnectionType(String name, ConnectionTypeArgs args)
public ConnectionType(String name, ConnectionTypeArgs args, CustomResourceOptions options)
type: azure:automation:ConnectionType
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ConnectionTypeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. ConnectionTypeArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. ConnectionTypeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ConnectionTypeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ConnectionTypeArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var connectionTypeResource = new Azure.Automation.ConnectionType("connectionTypeResource", new()
{
    AutomationAccountName = "string",
    Fields = new[]
    {
        new Azure.Automation.Inputs.ConnectionTypeFieldArgs
        {
            Name = "string",
            Type = "string",
            IsEncrypted = false,
            IsOptional = false,
        },
    },
    ResourceGroupName = "string",
    IsGlobal = false,
    Name = "string",
});
Copy
example, err := automation.NewConnectionType(ctx, "connectionTypeResource", &automation.ConnectionTypeArgs{
	AutomationAccountName: pulumi.String("string"),
	Fields: automation.ConnectionTypeFieldArray{
		&automation.ConnectionTypeFieldArgs{
			Name:        pulumi.String("string"),
			Type:        pulumi.String("string"),
			IsEncrypted: pulumi.Bool(false),
			IsOptional:  pulumi.Bool(false),
		},
	},
	ResourceGroupName: pulumi.String("string"),
	IsGlobal:          pulumi.Bool(false),
	Name:              pulumi.String("string"),
})
Copy
var connectionTypeResource = new ConnectionType("connectionTypeResource", ConnectionTypeArgs.builder()
    .automationAccountName("string")
    .fields(ConnectionTypeFieldArgs.builder()
        .name("string")
        .type("string")
        .isEncrypted(false)
        .isOptional(false)
        .build())
    .resourceGroupName("string")
    .isGlobal(false)
    .name("string")
    .build());
Copy
connection_type_resource = azure.automation.ConnectionType("connectionTypeResource",
    automation_account_name="string",
    fields=[{
        "name": "string",
        "type": "string",
        "is_encrypted": False,
        "is_optional": False,
    }],
    resource_group_name="string",
    is_global=False,
    name="string")
Copy
const connectionTypeResource = new azure.automation.ConnectionType("connectionTypeResource", {
    automationAccountName: "string",
    fields: [{
        name: "string",
        type: "string",
        isEncrypted: false,
        isOptional: false,
    }],
    resourceGroupName: "string",
    isGlobal: false,
    name: "string",
});
Copy
type: azure:automation:ConnectionType
properties:
    automationAccountName: string
    fields:
        - isEncrypted: false
          isOptional: false
          name: string
          type: string
    isGlobal: false
    name: string
    resourceGroupName: string
Copy

ConnectionType Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The ConnectionType resource accepts the following input properties:

AutomationAccountName
This property is required.
Changes to this property will trigger replacement.
string
The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
Fields
This property is required.
Changes to this property will trigger replacement.
List<ConnectionTypeField>
One or more field blocks as defined below. Changing this forces a new Automation to be created.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
IsGlobal Changes to this property will trigger replacement. bool
Whether the connection type is global. Changing this forces a new Automation to be created.
Name Changes to this property will trigger replacement. string
The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
AutomationAccountName
This property is required.
Changes to this property will trigger replacement.
string
The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
Fields
This property is required.
Changes to this property will trigger replacement.
[]ConnectionTypeFieldArgs
One or more field blocks as defined below. Changing this forces a new Automation to be created.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
IsGlobal Changes to this property will trigger replacement. bool
Whether the connection type is global. Changing this forces a new Automation to be created.
Name Changes to this property will trigger replacement. string
The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
automationAccountName
This property is required.
Changes to this property will trigger replacement.
String
The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
fields
This property is required.
Changes to this property will trigger replacement.
List<ConnectionTypeField>
One or more field blocks as defined below. Changing this forces a new Automation to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
isGlobal Changes to this property will trigger replacement. Boolean
Whether the connection type is global. Changing this forces a new Automation to be created.
name Changes to this property will trigger replacement. String
The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
automationAccountName
This property is required.
Changes to this property will trigger replacement.
string
The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
fields
This property is required.
Changes to this property will trigger replacement.
ConnectionTypeField[]
One or more field blocks as defined below. Changing this forces a new Automation to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
isGlobal Changes to this property will trigger replacement. boolean
Whether the connection type is global. Changing this forces a new Automation to be created.
name Changes to this property will trigger replacement. string
The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
automation_account_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
fields
This property is required.
Changes to this property will trigger replacement.
Sequence[ConnectionTypeFieldArgs]
One or more field blocks as defined below. Changing this forces a new Automation to be created.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
is_global Changes to this property will trigger replacement. bool
Whether the connection type is global. Changing this forces a new Automation to be created.
name Changes to this property will trigger replacement. str
The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
automationAccountName
This property is required.
Changes to this property will trigger replacement.
String
The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
fields
This property is required.
Changes to this property will trigger replacement.
List<Property Map>
One or more field blocks as defined below. Changing this forces a new Automation to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
isGlobal Changes to this property will trigger replacement. Boolean
Whether the connection type is global. Changing this forces a new Automation to be created.
name Changes to this property will trigger replacement. String
The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the ConnectionType resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing ConnectionType Resource

Get an existing ConnectionType resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ConnectionTypeState, opts?: CustomResourceOptions): ConnectionType
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        automation_account_name: Optional[str] = None,
        fields: Optional[Sequence[ConnectionTypeFieldArgs]] = None,
        is_global: Optional[bool] = None,
        name: Optional[str] = None,
        resource_group_name: Optional[str] = None) -> ConnectionType
func GetConnectionType(ctx *Context, name string, id IDInput, state *ConnectionTypeState, opts ...ResourceOption) (*ConnectionType, error)
public static ConnectionType Get(string name, Input<string> id, ConnectionTypeState? state, CustomResourceOptions? opts = null)
public static ConnectionType get(String name, Output<String> id, ConnectionTypeState state, CustomResourceOptions options)
resources:  _:    type: azure:automation:ConnectionType    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AutomationAccountName Changes to this property will trigger replacement. string
The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
Fields Changes to this property will trigger replacement. List<ConnectionTypeField>
One or more field blocks as defined below. Changing this forces a new Automation to be created.
IsGlobal Changes to this property will trigger replacement. bool
Whether the connection type is global. Changing this forces a new Automation to be created.
Name Changes to this property will trigger replacement. string
The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
ResourceGroupName Changes to this property will trigger replacement. string
The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
AutomationAccountName Changes to this property will trigger replacement. string
The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
Fields Changes to this property will trigger replacement. []ConnectionTypeFieldArgs
One or more field blocks as defined below. Changing this forces a new Automation to be created.
IsGlobal Changes to this property will trigger replacement. bool
Whether the connection type is global. Changing this forces a new Automation to be created.
Name Changes to this property will trigger replacement. string
The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
ResourceGroupName Changes to this property will trigger replacement. string
The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
automationAccountName Changes to this property will trigger replacement. String
The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
fields Changes to this property will trigger replacement. List<ConnectionTypeField>
One or more field blocks as defined below. Changing this forces a new Automation to be created.
isGlobal Changes to this property will trigger replacement. Boolean
Whether the connection type is global. Changing this forces a new Automation to be created.
name Changes to this property will trigger replacement. String
The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
resourceGroupName Changes to this property will trigger replacement. String
The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
automationAccountName Changes to this property will trigger replacement. string
The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
fields Changes to this property will trigger replacement. ConnectionTypeField[]
One or more field blocks as defined below. Changing this forces a new Automation to be created.
isGlobal Changes to this property will trigger replacement. boolean
Whether the connection type is global. Changing this forces a new Automation to be created.
name Changes to this property will trigger replacement. string
The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
resourceGroupName Changes to this property will trigger replacement. string
The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
automation_account_name Changes to this property will trigger replacement. str
The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
fields Changes to this property will trigger replacement. Sequence[ConnectionTypeFieldArgs]
One or more field blocks as defined below. Changing this forces a new Automation to be created.
is_global Changes to this property will trigger replacement. bool
Whether the connection type is global. Changing this forces a new Automation to be created.
name Changes to this property will trigger replacement. str
The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
resource_group_name Changes to this property will trigger replacement. str
The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.
automationAccountName Changes to this property will trigger replacement. String
The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.
fields Changes to this property will trigger replacement. List<Property Map>
One or more field blocks as defined below. Changing this forces a new Automation to be created.
isGlobal Changes to this property will trigger replacement. Boolean
Whether the connection type is global. Changing this forces a new Automation to be created.
name Changes to this property will trigger replacement. String
The name which should be used for this Automation Connection Type. Changing this forces a new Automation to be created.
resourceGroupName Changes to this property will trigger replacement. String
The name of the Resource Group where the Automation should exist. Changing this forces a new Automation to be created.

Supporting Types

ConnectionTypeField
, ConnectionTypeFieldArgs

Name This property is required. string
The name which should be used for this connection field definition.
Type This property is required. string
The type of the connection field definition.
IsEncrypted bool
Whether to set the isEncrypted flag of the connection field definition.
IsOptional bool
Whether to set the isOptional flag of the connection field definition.
Name This property is required. string
The name which should be used for this connection field definition.
Type This property is required. string
The type of the connection field definition.
IsEncrypted bool
Whether to set the isEncrypted flag of the connection field definition.
IsOptional bool
Whether to set the isOptional flag of the connection field definition.
name This property is required. String
The name which should be used for this connection field definition.
type This property is required. String
The type of the connection field definition.
isEncrypted Boolean
Whether to set the isEncrypted flag of the connection field definition.
isOptional Boolean
Whether to set the isOptional flag of the connection field definition.
name This property is required. string
The name which should be used for this connection field definition.
type This property is required. string
The type of the connection field definition.
isEncrypted boolean
Whether to set the isEncrypted flag of the connection field definition.
isOptional boolean
Whether to set the isOptional flag of the connection field definition.
name This property is required. str
The name which should be used for this connection field definition.
type This property is required. str
The type of the connection field definition.
is_encrypted bool
Whether to set the isEncrypted flag of the connection field definition.
is_optional bool
Whether to set the isOptional flag of the connection field definition.
name This property is required. String
The name which should be used for this connection field definition.
type This property is required. String
The type of the connection field definition.
isEncrypted Boolean
Whether to set the isEncrypted flag of the connection field definition.
isOptional Boolean
Whether to set the isOptional flag of the connection field definition.

Import

Automations can be imported using the resource id, e.g.

$ pulumi import azure:automation/connectionType:ConnectionType example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/connectionTypes/type1
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.