Deployment Args
data class DeploymentArgs(val apiName: Output<String>? = null, val customProperties: Output<Any>? = null, val definitionId: Output<String>? = null, val deploymentName: Output<String>? = null, val description: Output<String>? = null, val environmentId: Output<String>? = null, val resourceGroupName: Output<String>? = null, val server: Output<DeploymentServerArgs>? = null, val serviceName: Output<String>? = null, val state: Output<Either<String, DeploymentState>>? = null, val title: Output<String>? = null, val workspaceName: Output<String>? = null) : ConvertibleToJava<DeploymentArgs>
API deployment entity. Uses Azure REST API version 2024-03-01. Other available API versions: 2024-03-15-preview, 2024-06-01-preview.
Example Usage
Deployments_CreateOrUpdate
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:apicenter:Deployment production /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}/workspaces/{workspaceName}/apis/{apiName}/deployments/{deploymentName}
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(apiName: Output<String>? = null, customProperties: Output<Any>? = null, definitionId: Output<String>? = null, deploymentName: Output<String>? = null, description: Output<String>? = null, environmentId: Output<String>? = null, resourceGroupName: Output<String>? = null, server: Output<DeploymentServerArgs>? = null, serviceName: Output<String>? = null, state: Output<Either<String, DeploymentState>>? = null, title: Output<String>? = null, workspaceName: Output<String>? = null)
Properties
Link copied to clipboard
The custom metadata defined for API catalog entities.
Link copied to clipboard
API center-scoped definition resource ID.
Link copied to clipboard
The name of the API deployment.
Link copied to clipboard
Description of the deployment.
Link copied to clipboard
API center-scoped environment resource ID.
Link copied to clipboard
The name of the resource group. The name is case insensitive.
Link copied to clipboard
The deployment server
Link copied to clipboard
The name of Azure API Center service.
Link copied to clipboard
State of API deployment.
Link copied to clipboard
The name of the workspace.