Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.15.0 published on Wednesday, Aug 17, 2022 by Pulumi

ConnectionClassicCertificate

Manages an Automation Connection with type AzureClassicCertificate.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

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

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

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

    var exampleConnectionClassicCertificate = new Azure.Automation.ConnectionClassicCertificate("exampleConnectionClassicCertificate", new()
    {
        ResourceGroupName = exampleResourceGroup.Name,
        AutomationAccountName = exampleAccount.Name,
        CertificateAssetName = "cert1",
        SubscriptionName = "subs1",
        SubscriptionId = exampleClientConfig.Apply(getClientConfigResult => getClientConfigResult.SubscriptionId),
    });

});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/automation"
	"github.com/pulumi/pulumi-azure/sdk/v5/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, "exampleResourceGroup", &core.ResourceGroupArgs{
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleClientConfig, err := core.GetClientConfig(ctx, nil, nil)
		if err != nil {
			return err
		}
		exampleAccount, err := automation.NewAccount(ctx, "exampleAccount", &automation.AccountArgs{
			Location:          exampleResourceGroup.Location,
			ResourceGroupName: exampleResourceGroup.Name,
			SkuName:           pulumi.String("Basic"),
		})
		if err != nil {
			return err
		}
		_, err = automation.NewConnectionClassicCertificate(ctx, "exampleConnectionClassicCertificate", &automation.ConnectionClassicCertificateArgs{
			ResourceGroupName:     exampleResourceGroup.Name,
			AutomationAccountName: exampleAccount.Name,
			CertificateAssetName:  pulumi.String("cert1"),
			SubscriptionName:      pulumi.String("subs1"),
			SubscriptionId:        pulumi.String(exampleClientConfig.SubscriptionId),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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.ConnectionClassicCertificate;
import com.pulumi.azure.automation.ConnectionClassicCertificateArgs;
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()        
            .location("West Europe")
            .build());

        final var exampleClientConfig = CoreFunctions.getClientConfig();

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

        var exampleConnectionClassicCertificate = new ConnectionClassicCertificate("exampleConnectionClassicCertificate", ConnectionClassicCertificateArgs.builder()        
            .resourceGroupName(exampleResourceGroup.name())
            .automationAccountName(exampleAccount.name())
            .certificateAssetName("cert1")
            .subscriptionName("subs1")
            .subscriptionId(exampleClientConfig.applyValue(getClientConfigResult -> getClientConfigResult.subscriptionId()))
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_client_config = azure.core.get_client_config()
example_account = azure.automation.Account("exampleAccount",
    location=example_resource_group.location,
    resource_group_name=example_resource_group.name,
    sku_name="Basic")
example_connection_classic_certificate = azure.automation.ConnectionClassicCertificate("exampleConnectionClassicCertificate",
    resource_group_name=example_resource_group.name,
    automation_account_name=example_account.name,
    certificate_asset_name="cert1",
    subscription_name="subs1",
    subscription_id=example_client_config.subscription_id)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleClientConfig = azure.core.getClientConfig({});
const exampleAccount = new azure.automation.Account("exampleAccount", {
    location: exampleResourceGroup.location,
    resourceGroupName: exampleResourceGroup.name,
    skuName: "Basic",
});
const exampleConnectionClassicCertificate = new azure.automation.ConnectionClassicCertificate("exampleConnectionClassicCertificate", {
    resourceGroupName: exampleResourceGroup.name,
    automationAccountName: exampleAccount.name,
    certificateAssetName: "cert1",
    subscriptionName: "subs1",
    subscriptionId: exampleClientConfig.then(exampleClientConfig => exampleClientConfig.subscriptionId),
});
resources:
  exampleResourceGroup:
    type: azure:core:ResourceGroup
    properties:
      location: West Europe
  exampleAccount:
    type: azure:automation:Account
    properties:
      location: ${exampleResourceGroup.location}
      resourceGroupName: ${exampleResourceGroup.name}
      skuName: Basic
  exampleConnectionClassicCertificate:
    type: azure:automation:ConnectionClassicCertificate
    properties:
      resourceGroupName: ${exampleResourceGroup.name}
      automationAccountName: ${exampleAccount.name}
      certificateAssetName: cert1
      subscriptionName: subs1
      subscriptionId: ${exampleClientConfig.subscriptionId}
variables:
  exampleClientConfig:
    Fn::Invoke:
      Function: azure:core:getClientConfig
      Arguments: {}

Create a ConnectionClassicCertificate Resource

new ConnectionClassicCertificate(name: string, args: ConnectionClassicCertificateArgs, opts?: CustomResourceOptions);
@overload
def ConnectionClassicCertificate(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 automation_account_name: Optional[str] = None,
                                 certificate_asset_name: Optional[str] = None,
                                 description: Optional[str] = None,
                                 name: Optional[str] = None,
                                 resource_group_name: Optional[str] = None,
                                 subscription_id: Optional[str] = None,
                                 subscription_name: Optional[str] = None)
@overload
def ConnectionClassicCertificate(resource_name: str,
                                 args: ConnectionClassicCertificateArgs,
                                 opts: Optional[ResourceOptions] = None)
func NewConnectionClassicCertificate(ctx *Context, name string, args ConnectionClassicCertificateArgs, opts ...ResourceOption) (*ConnectionClassicCertificate, error)
public ConnectionClassicCertificate(string name, ConnectionClassicCertificateArgs args, CustomResourceOptions? opts = null)
public ConnectionClassicCertificate(String name, ConnectionClassicCertificateArgs args)
public ConnectionClassicCertificate(String name, ConnectionClassicCertificateArgs args, CustomResourceOptions options)
type: azure:automation:ConnectionClassicCertificate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

ConnectionClassicCertificate Resource Properties

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

Inputs

The ConnectionClassicCertificate resource accepts the following input properties:

AutomationAccountName string

The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.

CertificateAssetName string

The name of the certificate asset.

ResourceGroupName string

The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.

SubscriptionId string

The id of subscription.

SubscriptionName string

The name of subscription.

Description string

A description for this Connection.

Name string

Specifies the name of the Connection. Changing this forces a new resource to be created.

AutomationAccountName string

The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.

CertificateAssetName string

The name of the certificate asset.

ResourceGroupName string

The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.

SubscriptionId string

The id of subscription.

SubscriptionName string

The name of subscription.

Description string

A description for this Connection.

Name string

Specifies the name of the Connection. Changing this forces a new resource to be created.

automationAccountName String

The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.

certificateAssetName String

The name of the certificate asset.

resourceGroupName String

The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.

subscriptionId String

The id of subscription.

subscriptionName String

The name of subscription.

description String

A description for this Connection.

name String

Specifies the name of the Connection. Changing this forces a new resource to be created.

automationAccountName string

The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.

certificateAssetName string

The name of the certificate asset.

resourceGroupName string

The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.

subscriptionId string

The id of subscription.

subscriptionName string

The name of subscription.

description string

A description for this Connection.

name string

Specifies the name of the Connection. Changing this forces a new resource to be created.

automation_account_name str

The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.

certificate_asset_name str

The name of the certificate asset.

resource_group_name str

The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.

subscription_id str

The id of subscription.

subscription_name str

The name of subscription.

description str

A description for this Connection.

name str

Specifies the name of the Connection. Changing this forces a new resource to be created.

automationAccountName String

The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.

certificateAssetName String

The name of the certificate asset.

resourceGroupName String

The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.

subscriptionId String

The id of subscription.

subscriptionName String

The name of subscription.

description String

A description for this Connection.

name String

Specifies the name of the Connection. Changing this forces a new resource to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the ConnectionClassicCertificate 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 an Existing ConnectionClassicCertificate Resource

Get an existing ConnectionClassicCertificate 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?: ConnectionClassicCertificateState, opts?: CustomResourceOptions): ConnectionClassicCertificate
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        automation_account_name: Optional[str] = None,
        certificate_asset_name: Optional[str] = None,
        description: Optional[str] = None,
        name: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        subscription_id: Optional[str] = None,
        subscription_name: Optional[str] = None) -> ConnectionClassicCertificate
func GetConnectionClassicCertificate(ctx *Context, name string, id IDInput, state *ConnectionClassicCertificateState, opts ...ResourceOption) (*ConnectionClassicCertificate, error)
public static ConnectionClassicCertificate Get(string name, Input<string> id, ConnectionClassicCertificateState? state, CustomResourceOptions? opts = null)
public static ConnectionClassicCertificate get(String name, Output<String> id, ConnectionClassicCertificateState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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 string

The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.

CertificateAssetName string

The name of the certificate asset.

Description string

A description for this Connection.

Name string

Specifies the name of the Connection. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.

SubscriptionId string

The id of subscription.

SubscriptionName string

The name of subscription.

AutomationAccountName string

The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.

CertificateAssetName string

The name of the certificate asset.

Description string

A description for this Connection.

Name string

Specifies the name of the Connection. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.

SubscriptionId string

The id of subscription.

SubscriptionName string

The name of subscription.

automationAccountName String

The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.

certificateAssetName String

The name of the certificate asset.

description String

A description for this Connection.

name String

Specifies the name of the Connection. Changing this forces a new resource to be created.

resourceGroupName String

The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.

subscriptionId String

The id of subscription.

subscriptionName String

The name of subscription.

automationAccountName string

The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.

certificateAssetName string

The name of the certificate asset.

description string

A description for this Connection.

name string

Specifies the name of the Connection. Changing this forces a new resource to be created.

resourceGroupName string

The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.

subscriptionId string

The id of subscription.

subscriptionName string

The name of subscription.

automation_account_name str

The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.

certificate_asset_name str

The name of the certificate asset.

description str

A description for this Connection.

name str

Specifies the name of the Connection. Changing this forces a new resource to be created.

resource_group_name str

The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.

subscription_id str

The id of subscription.

subscription_name str

The name of subscription.

automationAccountName String

The name of the automation account in which the Connection is created. Changing this forces a new resource to be created.

certificateAssetName String

The name of the certificate asset.

description String

A description for this Connection.

name String

Specifies the name of the Connection. Changing this forces a new resource to be created.

resourceGroupName String

The name of the resource group in which the Connection is created. Changing this forces a new resource to be created.

subscriptionId String

The id of subscription.

subscriptionName String

The name of subscription.

Import

Automation Connection can be imported using the resource id, e.g.

 $ pulumi import azure:automation/connectionClassicCertificate:ConnectionClassicCertificate conn1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/connections/conn1

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.