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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.apicenter.kotlin
import com.pulumi.azurenative.apicenter.DeploymentArgs.builder
import com.pulumi.azurenative.apicenter.kotlin.enums.DeploymentState
import com.pulumi.azurenative.apicenter.kotlin.inputs.DeploymentServerArgs
import com.pulumi.azurenative.apicenter.kotlin.inputs.DeploymentServerArgsBuilder
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.Any
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* API deployment entity.
* Azure REST API version: 2024-03-01.
* Other available API versions: 2024-03-15-preview.
* ## Example Usage
* ### Deployments_CreateOrUpdate
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var deployment = new AzureNative.ApiCenter.Deployment("deployment", new()
* {
* ApiName = "echo-api",
* DefinitionId = "/workspaces/default/apis/echo-api/versions/2023-01-01/definitions/openapi",
* DeploymentName = "production",
* Description = "Public cloud production deployment.",
* EnvironmentId = "/workspaces/default/environments/production",
* ResourceGroupName = "contoso-resources",
* Server = new AzureNative.ApiCenter.Inputs.DeploymentServerArgs
* {
* RuntimeUri = new[]
* {
* "https://api.contoso.com",
* },
* },
* ServiceName = "contoso",
* State = AzureNative.ApiCenter.DeploymentState.Active,
* Title = "Production deployment",
* WorkspaceName = "default",
* });
* });
* ```
* ```go
* package main
* import (
* apicenter "github.com/pulumi/pulumi-azure-native-sdk/apicenter/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := apicenter.NewDeployment(ctx, "deployment", &apicenter.DeploymentArgs{
* ApiName: pulumi.String("echo-api"),
* DefinitionId: pulumi.String("/workspaces/default/apis/echo-api/versions/2023-01-01/definitions/openapi"),
* DeploymentName: pulumi.String("production"),
* Description: pulumi.String("Public cloud production deployment."),
* EnvironmentId: pulumi.String("/workspaces/default/environments/production"),
* ResourceGroupName: pulumi.String("contoso-resources"),
* Server: &apicenter.DeploymentServerArgs{
* RuntimeUri: pulumi.StringArray{
* pulumi.String("https://api.contoso.com"),
* },
* },
* ServiceName: pulumi.String("contoso"),
* State: pulumi.String(apicenter.DeploymentStateActive),
* Title: pulumi.String("Production deployment"),
* WorkspaceName: pulumi.String("default"),
* })
* 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.apicenter.Deployment;
* import com.pulumi.azurenative.apicenter.DeploymentArgs;
* import com.pulumi.azurenative.apicenter.inputs.DeploymentServerArgs;
* 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 deployment = new Deployment("deployment", DeploymentArgs.builder()
* .apiName("echo-api")
* .definitionId("/workspaces/default/apis/echo-api/versions/2023-01-01/definitions/openapi")
* .deploymentName("production")
* .description("Public cloud production deployment.")
* .environmentId("/workspaces/default/environments/production")
* .resourceGroupName("contoso-resources")
* .server(DeploymentServerArgs.builder()
* .runtimeUri("https://api.contoso.com")
* .build())
* .serviceName("contoso")
* .state("active")
* .title("Production deployment")
* .workspaceName("default")
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:apicenter:Deployment production /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}/workspaces/{workspaceName}/apis/{apiName}/deployments/{deploymentName}
* ```
* @property apiName The name of the API.
* @property customProperties The custom metadata defined for API catalog entities.
* @property definitionId API center-scoped definition resource ID.
* @property deploymentName The name of the API deployment.
* @property description Description of the deployment.
* @property environmentId API center-scoped environment resource ID.
* @property resourceGroupName The name of the resource group. The name is case insensitive.
* @property server The deployment server
* @property serviceName The name of Azure API Center service.
* @property state State of API deployment.
* @property title API deployment title
* @property workspaceName The name of the workspace.
*/
public data class DeploymentArgs(
public val apiName: Output? = null,
public val customProperties: Output? = null,
public val definitionId: Output? = null,
public val deploymentName: Output? = null,
public val description: Output? = null,
public val environmentId: Output? = null,
public val resourceGroupName: Output? = null,
public val server: Output? = null,
public val serviceName: Output? = null,
public val state: Output>? = null,
public val title: Output? = null,
public val workspaceName: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.apicenter.DeploymentArgs =
com.pulumi.azurenative.apicenter.DeploymentArgs.builder()
.apiName(apiName?.applyValue({ args0 -> args0 }))
.customProperties(customProperties?.applyValue({ args0 -> args0 }))
.definitionId(definitionId?.applyValue({ args0 -> args0 }))
.deploymentName(deploymentName?.applyValue({ args0 -> args0 }))
.description(description?.applyValue({ args0 -> args0 }))
.environmentId(environmentId?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.server(server?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.serviceName(serviceName?.applyValue({ args0 -> args0 }))
.state(
state?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.title(title?.applyValue({ args0 -> args0 }))
.workspaceName(workspaceName?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [DeploymentArgs].
*/
@PulumiTagMarker
public class DeploymentArgsBuilder internal constructor() {
private var apiName: Output? = null
private var customProperties: Output? = null
private var definitionId: Output? = null
private var deploymentName: Output? = null
private var description: Output? = null
private var environmentId: Output? = null
private var resourceGroupName: Output? = null
private var server: Output? = null
private var serviceName: Output? = null
private var state: Output>? = null
private var title: Output? = null
private var workspaceName: Output? = null
/**
* @param value The name of the API.
*/
@JvmName("byrmvdxshmggodrp")
public suspend fun apiName(`value`: Output) {
this.apiName = value
}
/**
* @param value The custom metadata defined for API catalog entities.
*/
@JvmName("eydhndlkhrbgvxxn")
public suspend fun customProperties(`value`: Output) {
this.customProperties = value
}
/**
* @param value API center-scoped definition resource ID.
*/
@JvmName("qiruoodnaaellqdg")
public suspend fun definitionId(`value`: Output) {
this.definitionId = value
}
/**
* @param value The name of the API deployment.
*/
@JvmName("dhddcxjosugqpqku")
public suspend fun deploymentName(`value`: Output) {
this.deploymentName = value
}
/**
* @param value Description of the deployment.
*/
@JvmName("iublyakncjgonlwr")
public suspend fun description(`value`: Output) {
this.description = value
}
/**
* @param value API center-scoped environment resource ID.
*/
@JvmName("dftmmgiwlbykiuhn")
public suspend fun environmentId(`value`: Output) {
this.environmentId = value
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("armrdowowjpylpap")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The deployment server
*/
@JvmName("upnlqpderbjfnbav")
public suspend fun server(`value`: Output) {
this.server = value
}
/**
* @param value The name of Azure API Center service.
*/
@JvmName("oriogtnqyvgldecr")
public suspend fun serviceName(`value`: Output) {
this.serviceName = value
}
/**
* @param value State of API deployment.
*/
@JvmName("djaarevmqaxthwtm")
public suspend fun state(`value`: Output>) {
this.state = value
}
/**
* @param value API deployment title
*/
@JvmName("iavqiuufowytxnrp")
public suspend fun title(`value`: Output) {
this.title = value
}
/**
* @param value The name of the workspace.
*/
@JvmName("vmeifvxurqfoeedj")
public suspend fun workspaceName(`value`: Output) {
this.workspaceName = value
}
/**
* @param value The name of the API.
*/
@JvmName("fnwniagyotpcgcke")
public suspend fun apiName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.apiName = mapped
}
/**
* @param value The custom metadata defined for API catalog entities.
*/
@JvmName("thkouthpuhikrype")
public suspend fun customProperties(`value`: Any?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.customProperties = mapped
}
/**
* @param value API center-scoped definition resource ID.
*/
@JvmName("uecpcabikwxgcvay")
public suspend fun definitionId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.definitionId = mapped
}
/**
* @param value The name of the API deployment.
*/
@JvmName("nmofnyiycmfpabay")
public suspend fun deploymentName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deploymentName = mapped
}
/**
* @param value Description of the deployment.
*/
@JvmName("ghanhuiuioyqrqmi")
public suspend fun description(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.description = mapped
}
/**
* @param value API center-scoped environment resource ID.
*/
@JvmName("alhoukhhlimcdyex")
public suspend fun environmentId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.environmentId = mapped
}
/**
* @param value The name of the resource group. The name is case insensitive.
*/
@JvmName("myidlnfvbiqmaggv")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The deployment server
*/
@JvmName("mhujajpcducstscw")
public suspend fun server(`value`: DeploymentServerArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.server = mapped
}
/**
* @param argument The deployment server
*/
@JvmName("oqlemmtnfhoivwuh")
public suspend fun server(argument: suspend DeploymentServerArgsBuilder.() -> Unit) {
val toBeMapped = DeploymentServerArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.server = mapped
}
/**
* @param value The name of Azure API Center service.
*/
@JvmName("ayvxynpmfsiinhpt")
public suspend fun serviceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.serviceName = mapped
}
/**
* @param value State of API deployment.
*/
@JvmName("excdupebrhhqjwgg")
public suspend fun state(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value State of API deployment.
*/
@JvmName("aoludobdgcbctpjo")
public fun state(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value State of API deployment.
*/
@JvmName("thloytvkecrucwsf")
public fun state(`value`: DeploymentState) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.state = mapped
}
/**
* @param value API deployment title
*/
@JvmName("ujwtxbcmkgrbakua")
public suspend fun title(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.title = mapped
}
/**
* @param value The name of the workspace.
*/
@JvmName("lidgwwxkammpftqg")
public suspend fun workspaceName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.workspaceName = mapped
}
internal fun build(): DeploymentArgs = DeploymentArgs(
apiName = apiName,
customProperties = customProperties,
definitionId = definitionId,
deploymentName = deploymentName,
description = description,
environmentId = environmentId,
resourceGroupName = resourceGroupName,
server = server,
serviceName = serviceName,
state = state,
title = title,
workspaceName = workspaceName,
)
}