Deployment
API deployment entity. Uses Azure REST API version 2024-03-15-preview. In version 2.x of the Azure Native provider, it used API version 2024-03-01. Other available API versions: 2024-03-01, 2024-06-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native apicenter [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
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",
});
});
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
})
}
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.
$ pulumi import azure-native:apicenter:Deployment production /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}/workspaces/{workspaceName}/apis/{apiName}/deployments/{deploymentName}
Properties
The Azure API version of the resource.
The custom metadata defined for API catalog entities.
API center-scoped definition resource ID.
Description of the deployment.
API center-scoped environment resource ID.
The deployment server
Azure Resource Manager metadata containing createdBy and modifiedBy information.