Python2Package
Definition of the module type. Uses Azure REST API version 2023-11-01. In version 2.x of the Azure Native provider, it used API version 2022-08-08. Other available API versions: 2018-06-30, 2019-06-01, 2020-01-13-preview, 2022-08-08, 2023-05-15-preview, 2024-10-23. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native automation [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
Create or update a python 2 package
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var python2Package = new AzureNative.Automation.Python2Package("python2Package", new()
{
AutomationAccountName = "myAutomationAccount33",
ContentLink = new AzureNative.Automation.Inputs.ContentLinkArgs
{
ContentHash = new AzureNative.Automation.Inputs.ContentHashArgs
{
Algorithm = "sha265",
Value = "07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A",
},
Uri = "https://teststorage.blob.core.windows.net/dsccomposite/OmsCompositeResources.zip",
Version = "1.0.0.0",
},
PackageName = "OmsCompositeResources",
ResourceGroupName = "rg",
Tags = null,
});
});
package main
import (
automation "github.com/pulumi/pulumi-azure-native-sdk/automation/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := automation.NewPython2Package(ctx, "python2Package", &automation.Python2PackageArgs{
AutomationAccountName: pulumi.String("myAutomationAccount33"),
ContentLink: &automation.ContentLinkArgs{
ContentHash: &automation.ContentHashArgs{
Algorithm: pulumi.String("sha265"),
Value: pulumi.String("07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A"),
},
Uri: pulumi.String("https://teststorage.blob.core.windows.net/dsccomposite/OmsCompositeResources.zip"),
Version: pulumi.String("1.0.0.0"),
},
PackageName: pulumi.String("OmsCompositeResources"),
ResourceGroupName: pulumi.String("rg"),
Tags: pulumi.StringMap{},
})
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.azurenative.automation.Python2Package;
import com.pulumi.azurenative.automation.Python2PackageArgs;
import com.pulumi.azurenative.automation.inputs.ContentLinkArgs;
import com.pulumi.azurenative.automation.inputs.ContentHashArgs;
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 python2Package = new Python2Package("python2Package", Python2PackageArgs.builder()
.automationAccountName("myAutomationAccount33")
.contentLink(ContentLinkArgs.builder()
.contentHash(ContentHashArgs.builder()
.algorithm("sha265")
.value("07E108A962B81DD9C9BAA89BB47C0F6EE52B29E83758B07795E408D258B2B87A")
.build())
.uri("https://teststorage.blob.core.windows.net/dsccomposite/OmsCompositeResources.zip")
.version("1.0.0.0")
.build())
.packageName("OmsCompositeResources")
.resourceGroupName("rg")
.tags(Map.ofEntries(
))
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:automation:Python2Package OmsCompositeResources /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python2Packages/{packageName}
Properties
Gets the activity count of the module.
The Azure API version of the resource.
Gets the creation time.
Gets or sets the description.
Gets the error info of the module.
Gets type of module, if its composite or not.
Gets the last modified time.
Gets the provisioning state of the module.
Gets the size in bytes of the module.