Environment Args
Environment 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
Environments_CreateOrUpdate
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var environment = new AzureNative.ApiCenter.Environment("environment", new()
{
Description = "The primary Azure API Management service for the European division of Contoso.",
EnvironmentName = "public",
Kind = AzureNative.ApiCenter.EnvironmentKind.Production,
Onboarding = new AzureNative.ApiCenter.Inputs.OnboardingArgs
{
DeveloperPortalUri = new[]
{
"https://developer.contoso.com",
},
Instructions = "Sign in or sign up in the specified developer portal to request API access. You must complete the internal privacy training for your account to be approved.",
},
ResourceGroupName = "contoso-resources",
Server = new AzureNative.ApiCenter.Inputs.EnvironmentServerArgs
{
ManagementPortalUri = new[]
{
"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ApiManagement/service/contoso",
},
Type = AzureNative.ApiCenter.EnvironmentServerType.Azure_API_Management,
},
ServiceName = "contoso",
Title = "Contoso Europe Azure API Management",
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.NewEnvironment(ctx, "environment", &apicenter.EnvironmentArgs{
Description: pulumi.String("The primary Azure API Management service for the European division of Contoso."),
EnvironmentName: pulumi.String("public"),
Kind: pulumi.String(apicenter.EnvironmentKindProduction),
Onboarding: &apicenter.OnboardingArgs{
DeveloperPortalUri: pulumi.StringArray{
pulumi.String("https://developer.contoso.com"),
},
Instructions: pulumi.String("Sign in or sign up in the specified developer portal to request API access. You must complete the internal privacy training for your account to be approved."),
},
ResourceGroupName: pulumi.String("contoso-resources"),
Server: &apicenter.EnvironmentServerArgs{
ManagementPortalUri: pulumi.StringArray{
pulumi.String("https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ApiManagement/service/contoso"),
},
Type: pulumi.String(apicenter.EnvironmentServerType_Azure_API_Management),
},
ServiceName: pulumi.String("contoso"),
Title: pulumi.String("Contoso Europe Azure API Management"),
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.Environment;
import com.pulumi.azurenative.apicenter.EnvironmentArgs;
import com.pulumi.azurenative.apicenter.inputs.OnboardingArgs;
import com.pulumi.azurenative.apicenter.inputs.EnvironmentServerArgs;
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 environment = new Environment("environment", EnvironmentArgs.builder()
.description("The primary Azure API Management service for the European division of Contoso.")
.environmentName("public")
.kind("production")
.onboarding(OnboardingArgs.builder()
.developerPortalUri("https://developer.contoso.com")
.instructions("Sign in or sign up in the specified developer portal to request API access. You must complete the internal privacy training for your account to be approved.")
.build())
.resourceGroupName("contoso-resources")
.server(EnvironmentServerArgs.builder()
.managementPortalUri("https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ApiManagement/service/contoso")
.type("Azure API Management")
.build())
.serviceName("contoso")
.title("Contoso Europe Azure API Management")
.workspaceName("default")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:apicenter:Environment public /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiCenter/services/{serviceName}/workspaces/{workspaceName}/environments/{environmentName}
Constructors
Properties
The custom metadata defined for API catalog entities.
The environment description.
The name of the environment.
Environment kind.
Environment onboarding information
The name of the resource group. The name is case insensitive.
Server information of the environment.
The name of Azure API Center service.
The name of the workspace.