All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.automation.kotlin.Python3Package.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.automation.kotlin
import com.pulumi.azurenative.automation.kotlin.outputs.ContentLinkResponse
import com.pulumi.azurenative.automation.kotlin.outputs.ModuleErrorInfoResponse
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Double
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import com.pulumi.azurenative.automation.kotlin.outputs.ContentLinkResponse.Companion.toKotlin as contentLinkResponseToKotlin
import com.pulumi.azurenative.automation.kotlin.outputs.ModuleErrorInfoResponse.Companion.toKotlin as moduleErrorInfoResponseToKotlin
/**
* Builder for [Python3Package].
*/
@PulumiTagMarker
public class Python3PackageResourceBuilder internal constructor() {
public var name: String? = null
public var args: Python3PackageArgs = Python3PackageArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend Python3PackageArgsBuilder.() -> Unit) {
val builder = Python3PackageArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Python3Package {
val builtJavaResource =
com.pulumi.azurenative.automation.Python3Package(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Python3Package(builtJavaResource)
}
}
/**
* Definition of the module type.
* Azure REST API version: 2022-08-08.
* Other available API versions: 2023-05-15-preview, 2023-11-01.
* ## Example Usage
* ### Create or update a python 3 package
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var python3Package = new AzureNative.Automation.Python3Package("python3Package", 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,
* });
* });
* ```
* ```go
* package main
* import (
* automation "github.com/pulumi/pulumi-azure-native-sdk/automation/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := automation.NewPython3Package(ctx, "python3Package", &automation.Python3PackageArgs{
* 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: nil,
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azurenative.automation.Python3Package;
* import com.pulumi.azurenative.automation.Python3PackageArgs;
* 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 python3Package = new Python3Package("python3Package", Python3PackageArgs.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()
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:automation:Python3Package OmsCompositeResources /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName}
* ```
*/
public class Python3Package internal constructor(
override val javaResource: com.pulumi.azurenative.automation.Python3Package,
) : KotlinCustomResource(javaResource, Python3PackageMapper) {
/**
* Gets or sets the activity count of the module.
*/
public val activityCount: Output?
get() = javaResource.activityCount().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Gets or sets the contentLink of the module.
*/
public val contentLink: Output?
get() = javaResource.contentLink().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
contentLinkResponseToKotlin(args0)
})
}).orElse(null)
})
/**
* Gets or sets the creation time.
*/
public val creationTime: Output?
get() = javaResource.creationTime().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Gets or sets the description.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Gets or sets the error info of the module.
*/
public val error: Output?
get() = javaResource.error().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
moduleErrorInfoResponseToKotlin(args0)
})
}).orElse(null)
})
/**
* Gets or sets the etag of the resource.
*/
public val etag: Output?
get() = javaResource.etag().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Gets or sets type of module, if its composite or not.
*/
public val isComposite: Output?
get() = javaResource.isComposite().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Gets or sets the isGlobal flag of the module.
*/
public val isGlobal: Output?
get() = javaResource.isGlobal().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Gets or sets the last modified time.
*/
public val lastModifiedTime: Output?
get() = javaResource.lastModifiedTime().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The Azure Region where the resource lives
*/
public val location: Output?
get() = javaResource.location().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The name of the resource
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Gets or sets the provisioning state of the module.
*/
public val provisioningState: Output?
get() = javaResource.provisioningState().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Gets or sets the size in bytes of the module.
*/
public val sizeInBytes: Output?
get() = javaResource.sizeInBytes().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Resource tags.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}).orElse(null)
})
/**
* The type of the resource.
*/
public val type: Output
get() = javaResource.type().applyValue({ args0 -> args0 })
/**
* Gets or sets the version of the module.
*/
public val version: Output?
get() = javaResource.version().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}
public object Python3PackageMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.azurenative.automation.Python3Package::class == javaResource::class
override fun map(javaResource: Resource): Python3Package = Python3Package(
javaResource as
com.pulumi.azurenative.automation.Python3Package,
)
}
/**
* @see [Python3Package].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Python3Package].
*/
public suspend fun python3Package(
name: String,
block: suspend Python3PackageResourceBuilder.() -> Unit,
): Python3Package {
val builder = Python3PackageResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Python3Package].
* @param name The _unique_ name of the resulting resource.
*/
public fun python3Package(name: String): Python3Package {
val builder = Python3PackageResourceBuilder()
builder.name(name)
return builder.build()
}