Api Version Args
data class ApiVersionArgs(val apiName: Output<String>? = null, val lifecycleStage: Output<Either<String, LifecycleStage>>? = null, val resourceGroupName: Output<String>? = null, val serviceName: Output<String>? = null, val title: Output<String>? = null, val versionName: Output<String>? = null, val workspaceName: Output<String>? = null) : ConvertibleToJava<ApiVersionArgs>
API version 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
ApiVersions_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var apiVersion = new AzureNative.ApiCenter.ApiVersion("apiVersion", new()
{
ApiName = "echo-api",
LifecycleStage = AzureNative.ApiCenter.LifecycleStage.Production,
ResourceGroupName = "contoso-resources",
ServiceName = "contoso",
Title = "2023-01-01",
VersionName = "2023-01-01",
WorkspaceName = "default",
});
});
Content copied to clipboard
package main
import (
apicenter "github.com/pulumi/pulumi-azure-native-sdk/apicenter/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apicenter.NewApiVersion(ctx, "apiVersion", &apicenter.ApiVersionArgs{
ApiName: pulumi.String("echo-api"),
LifecycleStage: pulumi.String(apicenter.LifecycleStageProduction),
ResourceGroupName: pulumi.String("contoso-resources"),
ServiceName: pulumi.String("contoso"),
Title: pulumi.String("2023-01-01"),
VersionName: pulumi.String("2023-01-01"),
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.ApiVersion;
import com.pulumi.azurenative.apicenter.ApiVersionArgs;
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 apiVersion = new ApiVersion("apiVersion", ApiVersionArgs.builder()
.apiName("echo-api")
.lifecycleStage("production")
.resourceGroupName("contoso-resources")
.serviceName("contoso")
.title("2023-01-01")
.versionName("2023-01-01")
.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:ApiVersion 2023-01-01 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}/workspaces/{workspaceName}/apis/{apiName}/versions/{versionName}
Content copied to clipboard
Properties
Link copied to clipboard
Current lifecycle stage of the API.
Link copied to clipboard
The name of the resource group. The name is case insensitive.
Link copied to clipboard
The name of Azure API Center service.
Link copied to clipboard
The name of the API version.
Link copied to clipboard
The name of the workspace.