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

We recommend using Azure Native.

Azure Classic v5.74.0 published on Monday, Apr 29, 2024 by Pulumi

azure.automation.Powershell72Module

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.74.0 published on Monday, Apr 29, 2024 by Pulumi

    Manages a Automation Powershell 7.2 Module.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleAccount = new azure.automation.Account("example", {
        name: "account1",
        location: example.location,
        resourceGroupName: example.name,
        skuName: "Basic",
    });
    const examplePowershell72Module = new azure.automation.Powershell72Module("example", {
        name: "xActiveDirectory",
        automationAccountId: exampleAccount.id,
        moduleLink: {
            uri: "https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg",
        },
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_account = azure.automation.Account("example",
        name="account1",
        location=example.location,
        resource_group_name=example.name,
        sku_name="Basic")
    example_powershell72_module = azure.automation.Powershell72Module("example",
        name="xActiveDirectory",
        automation_account_id=example_account.id,
        module_link=azure.automation.Powershell72ModuleModuleLinkArgs(
            uri="https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg",
        ))
    
    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 {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleAccount, err := automation.NewAccount(ctx, "example", &automation.AccountArgs{
    			Name:              pulumi.String("account1"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			SkuName:           pulumi.String("Basic"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = automation.NewPowershell72Module(ctx, "example", &automation.Powershell72ModuleArgs{
    			Name:                pulumi.String("xActiveDirectory"),
    			AutomationAccountId: exampleAccount.ID(),
    			ModuleLink: &automation.Powershell72ModuleModuleLinkArgs{
    				Uri: pulumi.String("https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleAccount = new Azure.Automation.Account("example", new()
        {
            Name = "account1",
            Location = example.Location,
            ResourceGroupName = example.Name,
            SkuName = "Basic",
        });
    
        var examplePowershell72Module = new Azure.Automation.Powershell72Module("example", new()
        {
            Name = "xActiveDirectory",
            AutomationAccountId = exampleAccount.Id,
            ModuleLink = new Azure.Automation.Inputs.Powershell72ModuleModuleLinkArgs
            {
                Uri = "https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg",
            },
        });
    
    });
    
    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.automation.Account;
    import com.pulumi.azure.automation.AccountArgs;
    import com.pulumi.azure.automation.Powershell72Module;
    import com.pulumi.azure.automation.Powershell72ModuleArgs;
    import com.pulumi.azure.automation.inputs.Powershell72ModuleModuleLinkArgs;
    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 example = new ResourceGroup("example", ResourceGroupArgs.builder()        
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleAccount = new Account("exampleAccount", AccountArgs.builder()        
                .name("account1")
                .location(example.location())
                .resourceGroupName(example.name())
                .skuName("Basic")
                .build());
    
            var examplePowershell72Module = new Powershell72Module("examplePowershell72Module", Powershell72ModuleArgs.builder()        
                .name("xActiveDirectory")
                .automationAccountId(exampleAccount.id())
                .moduleLink(Powershell72ModuleModuleLinkArgs.builder()
                    .uri("https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg")
                    .build())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleAccount:
        type: azure:automation:Account
        name: example
        properties:
          name: account1
          location: ${example.location}
          resourceGroupName: ${example.name}
          skuName: Basic
      examplePowershell72Module:
        type: azure:automation:Powershell72Module
        name: example
        properties:
          name: xActiveDirectory
          automationAccountId: ${exampleAccount.id}
          moduleLink:
            uri: https://devopsgallerystorage.blob.core.windows.net/packages/xactivedirectory.2.19.0.nupkg
    

    Create Powershell72Module Resource

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

    Constructor syntax

    new Powershell72Module(name: string, args: Powershell72ModuleArgs, opts?: CustomResourceOptions);
    @overload
    def Powershell72Module(resource_name: str,
                           args: Powershell72ModuleArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def Powershell72Module(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           automation_account_id: Optional[str] = None,
                           module_link: Optional[Powershell72ModuleModuleLinkArgs] = None,
                           name: Optional[str] = None)
    func NewPowershell72Module(ctx *Context, name string, args Powershell72ModuleArgs, opts ...ResourceOption) (*Powershell72Module, error)
    public Powershell72Module(string name, Powershell72ModuleArgs args, CustomResourceOptions? opts = null)
    public Powershell72Module(String name, Powershell72ModuleArgs args)
    public Powershell72Module(String name, Powershell72ModuleArgs args, CustomResourceOptions options)
    
    type: azure:automation:Powershell72Module
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args Powershell72ModuleArgs
    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 Powershell72ModuleArgs
    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 Powershell72ModuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args Powershell72ModuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args Powershell72ModuleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var powershell72ModuleResource = new Azure.Automation.Powershell72Module("powershell72ModuleResource", new()
    {
        AutomationAccountId = "string",
        ModuleLink = new Azure.Automation.Inputs.Powershell72ModuleModuleLinkArgs
        {
            Uri = "string",
            Hash = new Azure.Automation.Inputs.Powershell72ModuleModuleLinkHashArgs
            {
                Algorithm = "string",
                Value = "string",
            },
        },
        Name = "string",
    });
    
    example, err := automation.NewPowershell72Module(ctx, "powershell72ModuleResource", &automation.Powershell72ModuleArgs{
    	AutomationAccountId: pulumi.String("string"),
    	ModuleLink: &automation.Powershell72ModuleModuleLinkArgs{
    		Uri: pulumi.String("string"),
    		Hash: &automation.Powershell72ModuleModuleLinkHashArgs{
    			Algorithm: pulumi.String("string"),
    			Value:     pulumi.String("string"),
    		},
    	},
    	Name: pulumi.String("string"),
    })
    
    var powershell72ModuleResource = new Powershell72Module("powershell72ModuleResource", Powershell72ModuleArgs.builder()        
        .automationAccountId("string")
        .moduleLink(Powershell72ModuleModuleLinkArgs.builder()
            .uri("string")
            .hash(Powershell72ModuleModuleLinkHashArgs.builder()
                .algorithm("string")
                .value("string")
                .build())
            .build())
        .name("string")
        .build());
    
    powershell72_module_resource = azure.automation.Powershell72Module("powershell72ModuleResource",
        automation_account_id="string",
        module_link=azure.automation.Powershell72ModuleModuleLinkArgs(
            uri="string",
            hash=azure.automation.Powershell72ModuleModuleLinkHashArgs(
                algorithm="string",
                value="string",
            ),
        ),
        name="string")
    
    const powershell72ModuleResource = new azure.automation.Powershell72Module("powershell72ModuleResource", {
        automationAccountId: "string",
        moduleLink: {
            uri: "string",
            hash: {
                algorithm: "string",
                value: "string",
            },
        },
        name: "string",
    });
    
    type: azure:automation:Powershell72Module
    properties:
        automationAccountId: string
        moduleLink:
            hash:
                algorithm: string
                value: string
            uri: string
        name: string
    

    Powershell72Module 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 Powershell72Module resource accepts the following input properties:

    AutomationAccountId string
    The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
    ModuleLink Powershell72ModuleModuleLink
    A module_link block as defined below.
    Name string
    Specifies the name of the Module. Changing this forces a new resource to be created.
    AutomationAccountId string
    The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
    ModuleLink Powershell72ModuleModuleLinkArgs
    A module_link block as defined below.
    Name string
    Specifies the name of the Module. Changing this forces a new resource to be created.
    automationAccountId String
    The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
    moduleLink Powershell72ModuleModuleLink
    A module_link block as defined below.
    name String
    Specifies the name of the Module. Changing this forces a new resource to be created.
    automationAccountId string
    The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
    moduleLink Powershell72ModuleModuleLink
    A module_link block as defined below.
    name string
    Specifies the name of the Module. Changing this forces a new resource to be created.
    automation_account_id str
    The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
    module_link Powershell72ModuleModuleLinkArgs
    A module_link block as defined below.
    name str
    Specifies the name of the Module. Changing this forces a new resource to be created.
    automationAccountId String
    The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
    moduleLink Property Map
    A module_link block as defined below.
    name String
    Specifies the name of the Module. Changing this forces a new resource to be created.

    Outputs

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

    Get an existing Powershell72Module 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?: Powershell72ModuleState, opts?: CustomResourceOptions): Powershell72Module
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            automation_account_id: Optional[str] = None,
            module_link: Optional[Powershell72ModuleModuleLinkArgs] = None,
            name: Optional[str] = None) -> Powershell72Module
    func GetPowershell72Module(ctx *Context, name string, id IDInput, state *Powershell72ModuleState, opts ...ResourceOption) (*Powershell72Module, error)
    public static Powershell72Module Get(string name, Input<string> id, Powershell72ModuleState? state, CustomResourceOptions? opts = null)
    public static Powershell72Module get(String name, Output<String> id, Powershell72ModuleState 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:
    AutomationAccountId string
    The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
    ModuleLink Powershell72ModuleModuleLink
    A module_link block as defined below.
    Name string
    Specifies the name of the Module. Changing this forces a new resource to be created.
    AutomationAccountId string
    The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
    ModuleLink Powershell72ModuleModuleLinkArgs
    A module_link block as defined below.
    Name string
    Specifies the name of the Module. Changing this forces a new resource to be created.
    automationAccountId String
    The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
    moduleLink Powershell72ModuleModuleLink
    A module_link block as defined below.
    name String
    Specifies the name of the Module. Changing this forces a new resource to be created.
    automationAccountId string
    The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
    moduleLink Powershell72ModuleModuleLink
    A module_link block as defined below.
    name string
    Specifies the name of the Module. Changing this forces a new resource to be created.
    automation_account_id str
    The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
    module_link Powershell72ModuleModuleLinkArgs
    A module_link block as defined below.
    name str
    Specifies the name of the Module. Changing this forces a new resource to be created.
    automationAccountId String
    The ID of Automation Account to manage this Watcher. Changing this forces a new Watcher to be created.
    moduleLink Property Map
    A module_link block as defined below.
    name String
    Specifies the name of the Module. Changing this forces a new resource to be created.

    Supporting Types

    Uri string
    The URI of the module content (zip or nupkg).
    Hash Powershell72ModuleModuleLinkHash
    A hash block as defined below.
    Uri string
    The URI of the module content (zip or nupkg).
    Hash Powershell72ModuleModuleLinkHash
    A hash block as defined below.
    uri String
    The URI of the module content (zip or nupkg).
    hash Powershell72ModuleModuleLinkHash
    A hash block as defined below.
    uri string
    The URI of the module content (zip or nupkg).
    hash Powershell72ModuleModuleLinkHash
    A hash block as defined below.
    uri str
    The URI of the module content (zip or nupkg).
    hash Powershell72ModuleModuleLinkHash
    A hash block as defined below.
    uri String
    The URI of the module content (zip or nupkg).
    hash Property Map
    A hash block as defined below.

    Powershell72ModuleModuleLinkHash, Powershell72ModuleModuleLinkHashArgs

    Algorithm string
    Specifies the algorithm used for the hash content.
    Value string
    The hash value of the content.
    Algorithm string
    Specifies the algorithm used for the hash content.
    Value string
    The hash value of the content.
    algorithm String
    Specifies the algorithm used for the hash content.
    value String
    The hash value of the content.
    algorithm string
    Specifies the algorithm used for the hash content.
    value string
    The hash value of the content.
    algorithm str
    Specifies the algorithm used for the hash content.
    value str
    The hash value of the content.
    algorithm String
    Specifies the algorithm used for the hash content.
    value String
    The hash value of the content.

    Import

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

    $ pulumi import azure:automation/powershell72Module:Powershell72Module module1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/powerShell72Modules/module1
    

    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.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.74.0 published on Monday, Apr 29, 2024 by Pulumi