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.containerregistry.kotlin.RegistryArgs.kt Maven / Gradle / Ivy
Go to download
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.containerregistry.kotlin
import com.pulumi.azurenative.containerregistry.RegistryArgs.builder
import com.pulumi.azurenative.containerregistry.kotlin.enums.NetworkRuleBypassOptions
import com.pulumi.azurenative.containerregistry.kotlin.enums.PublicNetworkAccess
import com.pulumi.azurenative.containerregistry.kotlin.enums.ZoneRedundancy
import com.pulumi.azurenative.containerregistry.kotlin.inputs.EncryptionPropertyArgs
import com.pulumi.azurenative.containerregistry.kotlin.inputs.EncryptionPropertyArgsBuilder
import com.pulumi.azurenative.containerregistry.kotlin.inputs.IdentityPropertiesArgs
import com.pulumi.azurenative.containerregistry.kotlin.inputs.IdentityPropertiesArgsBuilder
import com.pulumi.azurenative.containerregistry.kotlin.inputs.NetworkRuleSetArgs
import com.pulumi.azurenative.containerregistry.kotlin.inputs.NetworkRuleSetArgsBuilder
import com.pulumi.azurenative.containerregistry.kotlin.inputs.PoliciesArgs
import com.pulumi.azurenative.containerregistry.kotlin.inputs.PoliciesArgsBuilder
import com.pulumi.azurenative.containerregistry.kotlin.inputs.SkuArgs
import com.pulumi.azurenative.containerregistry.kotlin.inputs.SkuArgsBuilder
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* An object that represents a container registry.
* Azure REST API version: 2022-12-01. Prior API version in Azure Native 1.x: 2019-05-01.
* Other available API versions: 2017-03-01, 2019-05-01, 2023-01-01-preview, 2023-06-01-preview, 2023-07-01, 2023-08-01-preview, 2023-11-01-preview.
* ## Example Usage
* ### RegistryCreate
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var registry = new AzureNative.ContainerRegistry.Registry("registry", new()
* {
* AdminUserEnabled = true,
* Location = "westus",
* RegistryName = "myRegistry",
* ResourceGroupName = "myResourceGroup",
* Sku = new AzureNative.ContainerRegistry.Inputs.SkuArgs
* {
* Name = AzureNative.ContainerRegistry.SkuName.Standard,
* },
* Tags =
* {
* { "key", "value" },
* },
* });
* });
* ```
* ```go
* package main
* import (
* containerregistry "github.com/pulumi/pulumi-azure-native-sdk/containerregistry/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := containerregistry.NewRegistry(ctx, "registry", &containerregistry.RegistryArgs{
* AdminUserEnabled: pulumi.Bool(true),
* Location: pulumi.String("westus"),
* RegistryName: pulumi.String("myRegistry"),
* ResourceGroupName: pulumi.String("myResourceGroup"),
* Sku: &containerregistry.SkuArgs{
* Name: pulumi.String(containerregistry.SkuNameStandard),
* },
* Tags: pulumi.StringMap{
* "key": pulumi.String("value"),
* },
* })
* 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.containerregistry.Registry;
* import com.pulumi.azurenative.containerregistry.RegistryArgs;
* import com.pulumi.azurenative.containerregistry.inputs.SkuArgs;
* 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 registry = new Registry("registry", RegistryArgs.builder()
* .adminUserEnabled(true)
* .location("westus")
* .registryName("myRegistry")
* .resourceGroupName("myResourceGroup")
* .sku(SkuArgs.builder()
* .name("Standard")
* .build())
* .tags(Map.of("key", "value"))
* .build());
* }
* }
* ```
* ### RegistryCreateZoneRedundant
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var registry = new AzureNative.ContainerRegistry.Registry("registry", new()
* {
* Location = "westus",
* RegistryName = "myRegistry",
* ResourceGroupName = "myResourceGroup",
* Sku = new AzureNative.ContainerRegistry.Inputs.SkuArgs
* {
* Name = AzureNative.ContainerRegistry.SkuName.Standard,
* },
* Tags =
* {
* { "key", "value" },
* },
* ZoneRedundancy = AzureNative.ContainerRegistry.ZoneRedundancy.Enabled,
* });
* });
* ```
* ```go
* package main
* import (
* containerregistry "github.com/pulumi/pulumi-azure-native-sdk/containerregistry/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := containerregistry.NewRegistry(ctx, "registry", &containerregistry.RegistryArgs{
* Location: pulumi.String("westus"),
* RegistryName: pulumi.String("myRegistry"),
* ResourceGroupName: pulumi.String("myResourceGroup"),
* Sku: &containerregistry.SkuArgs{
* Name: pulumi.String(containerregistry.SkuNameStandard),
* },
* Tags: pulumi.StringMap{
* "key": pulumi.String("value"),
* },
* ZoneRedundancy: pulumi.String(containerregistry.ZoneRedundancyEnabled),
* })
* 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.containerregistry.Registry;
* import com.pulumi.azurenative.containerregistry.RegistryArgs;
* import com.pulumi.azurenative.containerregistry.inputs.SkuArgs;
* 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 registry = new Registry("registry", RegistryArgs.builder()
* .location("westus")
* .registryName("myRegistry")
* .resourceGroupName("myResourceGroup")
* .sku(SkuArgs.builder()
* .name("Standard")
* .build())
* .tags(Map.of("key", "value"))
* .zoneRedundancy("Enabled")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:containerregistry:Registry myRegistry /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}
* ```
* @property adminUserEnabled The value that indicates whether the admin user is enabled.
* @property dataEndpointEnabled Enable a single data endpoint per region for serving data.
* @property encryption The encryption settings of container registry.
* @property identity The identity of the container registry.
* @property location The location of the resource. This cannot be changed after the resource is created.
* @property networkRuleBypassOptions Whether to allow trusted Azure services to access a network restricted registry.
* @property networkRuleSet The network rule set for a container registry.
* @property policies The policies for a container registry.
* @property publicNetworkAccess Whether or not public network access is allowed for the container registry.
* @property registryName The name of the container registry.
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property sku The SKU of the container registry.
* @property tags The tags of the resource.
* @property zoneRedundancy Whether or not zone redundancy is enabled for this container registry
*/
public data class RegistryArgs(
public val adminUserEnabled: Output? = null,
public val dataEndpointEnabled: Output? = null,
public val encryption: Output? = null,
public val identity: Output? = null,
public val location: Output? = null,
public val networkRuleBypassOptions: Output>? = null,
public val networkRuleSet: Output? = null,
public val policies: Output? = null,
public val publicNetworkAccess: Output>? = null,
public val registryName: Output? = null,
public val resourceGroupName: Output? = null,
public val sku: Output? = null,
public val tags: Output>? = null,
public val zoneRedundancy: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.containerregistry.RegistryArgs =
com.pulumi.azurenative.containerregistry.RegistryArgs.builder()
.adminUserEnabled(adminUserEnabled?.applyValue({ args0 -> args0 }))
.dataEndpointEnabled(dataEndpointEnabled?.applyValue({ args0 -> args0 }))
.encryption(encryption?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.location(location?.applyValue({ args0 -> args0 }))
.networkRuleBypassOptions(
networkRuleBypassOptions?.applyValue({ args0 ->
args0.transform({ args0 ->
args0
}, { args0 -> args0.let({ args0 -> args0.toJava() }) })
}),
)
.networkRuleSet(networkRuleSet?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.policies(policies?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.publicNetworkAccess(
publicNetworkAccess?.applyValue({ args0 ->
args0.transform(
{ args0 -> args0 },
{ args0 -> args0.let({ args0 -> args0.toJava() }) },
)
}),
)
.registryName(registryName?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.zoneRedundancy(
zoneRedundancy?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
).build()
}
/**
* Builder for [RegistryArgs].
*/
@PulumiTagMarker
public class RegistryArgsBuilder internal constructor() {
private var adminUserEnabled: Output? = null
private var dataEndpointEnabled: Output? = null
private var encryption: Output? = null
private var identity: Output? = null
private var location: Output? = null
private var networkRuleBypassOptions: Output>? = null
private var networkRuleSet: Output? = null
private var policies: Output? = null
private var publicNetworkAccess: Output>? = null
private var registryName: Output? = null
private var resourceGroupName: Output? = null
private var sku: Output? = null
private var tags: Output>? = null
private var zoneRedundancy: Output>? = null
/**
* @param value The value that indicates whether the admin user is enabled.
*/
@JvmName("wuedqqwenghhiclt")
public suspend fun adminUserEnabled(`value`: Output) {
this.adminUserEnabled = value
}
/**
* @param value Enable a single data endpoint per region for serving data.
*/
@JvmName("cbvxsmshgcooaqpl")
public suspend fun dataEndpointEnabled(`value`: Output) {
this.dataEndpointEnabled = value
}
/**
* @param value The encryption settings of container registry.
*/
@JvmName("aalmttbitjurftyn")
public suspend fun encryption(`value`: Output) {
this.encryption = value
}
/**
* @param value The identity of the container registry.
*/
@JvmName("nkygocbapwmqioag")
public suspend fun identity(`value`: Output) {
this.identity = value
}
/**
* @param value The location of the resource. This cannot be changed after the resource is created.
*/
@JvmName("sxuvucxdfyadrenb")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value Whether to allow trusted Azure services to access a network restricted registry.
*/
@JvmName("amyrqytoywypwuju")
public suspend fun networkRuleBypassOptions(`value`: Output>) {
this.networkRuleBypassOptions = value
}
/**
* @param value The network rule set for a container registry.
*/
@JvmName("amlqbxgtixgcakim")
public suspend fun networkRuleSet(`value`: Output) {
this.networkRuleSet = value
}
/**
* @param value The policies for a container registry.
*/
@JvmName("kfygdbktulrqygei")
public suspend fun policies(`value`: Output) {
this.policies = value
}
/**
* @param value Whether or not public network access is allowed for the container registry.
*/
@JvmName("lupjvgobbibsuoeb")
public suspend fun publicNetworkAccess(`value`: Output>) {
this.publicNetworkAccess = value
}
/**
* @param value The name of the container registry.
*/
@JvmName("jfjubiamsywfosws")
public suspend fun registryName(`value`: Output) {
this.registryName = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("gtjyxexervjvvqdp")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The SKU of the container registry.
*/
@JvmName("jricmljmnqnxevsi")
public suspend fun sku(`value`: Output) {
this.sku = value
}
/**
* @param value The tags of the resource.
*/
@JvmName("dfulfrbdieemiokj")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Whether or not zone redundancy is enabled for this container registry
*/
@JvmName("qrqjftvwqbpkppge")
public suspend fun zoneRedundancy(`value`: Output>) {
this.zoneRedundancy = value
}
/**
* @param value The value that indicates whether the admin user is enabled.
*/
@JvmName("qrbmpoocpddfjusm")
public suspend fun adminUserEnabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.adminUserEnabled = mapped
}
/**
* @param value Enable a single data endpoint per region for serving data.
*/
@JvmName("udqvqilqfguqenpg")
public suspend fun dataEndpointEnabled(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.dataEndpointEnabled = mapped
}
/**
* @param value The encryption settings of container registry.
*/
@JvmName("jrwsjxstxsgauxjm")
public suspend fun encryption(`value`: EncryptionPropertyArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.encryption = mapped
}
/**
* @param argument The encryption settings of container registry.
*/
@JvmName("pbkcwxkrbsvglpfj")
public suspend fun encryption(argument: suspend EncryptionPropertyArgsBuilder.() -> Unit) {
val toBeMapped = EncryptionPropertyArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.encryption = mapped
}
/**
* @param value The identity of the container registry.
*/
@JvmName("dfgkmljvmrhcugyu")
public suspend fun identity(`value`: IdentityPropertiesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.identity = mapped
}
/**
* @param argument The identity of the container registry.
*/
@JvmName("niqntnfqkqcqqxpt")
public suspend fun identity(argument: suspend IdentityPropertiesArgsBuilder.() -> Unit) {
val toBeMapped = IdentityPropertiesArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.identity = mapped
}
/**
* @param value The location of the resource. This cannot be changed after the resource is created.
*/
@JvmName("lcxhoavxadrpgggn")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value Whether to allow trusted Azure services to access a network restricted registry.
*/
@JvmName("igoavfpqpsfikhxa")
public suspend fun networkRuleBypassOptions(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkRuleBypassOptions = mapped
}
/**
* @param value Whether to allow trusted Azure services to access a network restricted registry.
*/
@JvmName("srxrvmbfhaunpufu")
public fun networkRuleBypassOptions(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.networkRuleBypassOptions = mapped
}
/**
* @param value Whether to allow trusted Azure services to access a network restricted registry.
*/
@JvmName("scfhaxvpolmqvkdh")
public fun networkRuleBypassOptions(`value`: NetworkRuleBypassOptions) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.networkRuleBypassOptions = mapped
}
/**
* @param value The network rule set for a container registry.
*/
@JvmName("osblkpfqxjygulsr")
public suspend fun networkRuleSet(`value`: NetworkRuleSetArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkRuleSet = mapped
}
/**
* @param argument The network rule set for a container registry.
*/
@JvmName("vouymcuatxhayucl")
public suspend fun networkRuleSet(argument: suspend NetworkRuleSetArgsBuilder.() -> Unit) {
val toBeMapped = NetworkRuleSetArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.networkRuleSet = mapped
}
/**
* @param value The policies for a container registry.
*/
@JvmName("txwgrgvscfwmxgqd")
public suspend fun policies(`value`: PoliciesArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.policies = mapped
}
/**
* @param argument The policies for a container registry.
*/
@JvmName("ncmsbnvsjivqamxg")
public suspend fun policies(argument: suspend PoliciesArgsBuilder.() -> Unit) {
val toBeMapped = PoliciesArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.policies = mapped
}
/**
* @param value Whether or not public network access is allowed for the container registry.
*/
@JvmName("rnjcaffprtewgarh")
public suspend fun publicNetworkAccess(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.publicNetworkAccess = mapped
}
/**
* @param value Whether or not public network access is allowed for the container registry.
*/
@JvmName("njccclehpttnttte")
public fun publicNetworkAccess(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.publicNetworkAccess = mapped
}
/**
* @param value Whether or not public network access is allowed for the container registry.
*/
@JvmName("fnshodgfqjhwcpsi")
public fun publicNetworkAccess(`value`: PublicNetworkAccess) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.publicNetworkAccess = mapped
}
/**
* @param value The name of the container registry.
*/
@JvmName("wheltyadynvogfbn")
public suspend fun registryName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.registryName = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("sdnlmysfjsoxsjju")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The SKU of the container registry.
*/
@JvmName("hkkptvfuseeaybky")
public suspend fun sku(`value`: SkuArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sku = mapped
}
/**
* @param argument The SKU of the container registry.
*/
@JvmName("semcjienjoknbrnx")
public suspend fun sku(argument: suspend SkuArgsBuilder.() -> Unit) {
val toBeMapped = SkuArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.sku = mapped
}
/**
* @param value The tags of the resource.
*/
@JvmName("eildvgqltiwyptdf")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values The tags of the resource.
*/
@JvmName("dclmjiiervlxdmvr")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value Whether or not zone redundancy is enabled for this container registry
*/
@JvmName("iyhmmorpkrdetold")
public suspend fun zoneRedundancy(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.zoneRedundancy = mapped
}
/**
* @param value Whether or not zone redundancy is enabled for this container registry
*/
@JvmName("qerhlpvrgmydjhgl")
public fun zoneRedundancy(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.zoneRedundancy = mapped
}
/**
* @param value Whether or not zone redundancy is enabled for this container registry
*/
@JvmName("rcmobdxubgkflwjv")
public fun zoneRedundancy(`value`: ZoneRedundancy) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.zoneRedundancy = mapped
}
internal fun build(): RegistryArgs = RegistryArgs(
adminUserEnabled = adminUserEnabled,
dataEndpointEnabled = dataEndpointEnabled,
encryption = encryption,
identity = identity,
location = location,
networkRuleBypassOptions = networkRuleBypassOptions,
networkRuleSet = networkRuleSet,
policies = policies,
publicNetworkAccess = publicNetworkAccess,
registryName = registryName,
resourceGroupName = resourceGroupName,
sku = sku,
tags = tags,
zoneRedundancy = zoneRedundancy,
)
}