Workspace Api Args
API details. Uses Azure REST API version 2022-09-01-preview. In version 2.x of the Azure Native provider, it used API version 2022-09-01-preview. Other available API versions: 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01, 2024-06-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native apimanagement [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
ApiManagementCreateWorkspaceApi
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var workspaceApi = new AzureNative.ApiManagement.WorkspaceApi("workspaceApi", new()
{
ApiId = "tempgroup",
AuthenticationSettings = new AzureNative.ApiManagement.Inputs.AuthenticationSettingsContractArgs
{
OAuth2 = new AzureNative.ApiManagement.Inputs.OAuth2AuthenticationSettingsContractArgs
{
AuthorizationServerId = "authorizationServerId2283",
Scope = "oauth2scope2580",
},
},
Description = "apidescription5200",
DisplayName = "apiname1463",
Path = "newapiPath",
Protocols = new[]
{
AzureNative.ApiManagement.Protocol.Https,
AzureNative.ApiManagement.Protocol.Http,
},
ResourceGroupName = "rg1",
ServiceName = "apimService1",
ServiceUrl = "http://newechoapi.cloudapp.net/api",
SubscriptionKeyParameterNames = new AzureNative.ApiManagement.Inputs.SubscriptionKeyParameterNamesContractArgs
{
Header = "header4520",
Query = "query3037",
},
WorkspaceId = "wks1",
});
});
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apimanagement.NewWorkspaceApi(ctx, "workspaceApi", &apimanagement.WorkspaceApiArgs{
ApiId: pulumi.String("tempgroup"),
AuthenticationSettings: &apimanagement.AuthenticationSettingsContractArgs{
OAuth2: &apimanagement.OAuth2AuthenticationSettingsContractArgs{
AuthorizationServerId: pulumi.String("authorizationServerId2283"),
Scope: pulumi.String("oauth2scope2580"),
},
},
Description: pulumi.String("apidescription5200"),
DisplayName: pulumi.String("apiname1463"),
Path: pulumi.String("newapiPath"),
Protocols: pulumi.StringArray{
pulumi.String(apimanagement.ProtocolHttps),
pulumi.String(apimanagement.ProtocolHttp),
},
ResourceGroupName: pulumi.String("rg1"),
ServiceName: pulumi.String("apimService1"),
ServiceUrl: pulumi.String("http://newechoapi.cloudapp.net/api"),
SubscriptionKeyParameterNames: &apimanagement.SubscriptionKeyParameterNamesContractArgs{
Header: pulumi.String("header4520"),
Query: pulumi.String("query3037"),
},
WorkspaceId: pulumi.String("wks1"),
})
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.apimanagement.WorkspaceApi;
import com.pulumi.azurenative.apimanagement.WorkspaceApiArgs;
import com.pulumi.azurenative.apimanagement.inputs.AuthenticationSettingsContractArgs;
import com.pulumi.azurenative.apimanagement.inputs.OAuth2AuthenticationSettingsContractArgs;
import com.pulumi.azurenative.apimanagement.inputs.SubscriptionKeyParameterNamesContractArgs;
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 workspaceApi = new WorkspaceApi("workspaceApi", WorkspaceApiArgs.builder()
.apiId("tempgroup")
.authenticationSettings(AuthenticationSettingsContractArgs.builder()
.oAuth2(OAuth2AuthenticationSettingsContractArgs.builder()
.authorizationServerId("authorizationServerId2283")
.scope("oauth2scope2580")
.build())
.build())
.description("apidescription5200")
.displayName("apiname1463")
.path("newapiPath")
.protocols(
"https",
"http")
.resourceGroupName("rg1")
.serviceName("apimService1")
.serviceUrl("http://newechoapi.cloudapp.net/api")
.subscriptionKeyParameterNames(SubscriptionKeyParameterNamesContractArgs.builder()
.header("header4520")
.query("query3037")
.build())
.workspaceId("wks1")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:apimanagement:WorkspaceApi apiid9419 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}
Constructors
Properties
Describes the revision of the API. If no value is provided, default revision 1 is created
Description of the API Revision.
Indicates the version identifier of the API if the API is versioned
Description of the API Version.
Version set details
A resource identifier for the related ApiVersionSet.
Collection of authentication settings included into this API.
Contact information for the API.
Description of the API. May include HTML formatting tags.
API name. Must be 1 to 300 characters long.
Format of the Content in which the API is getting imported.
License information for the API.
The name of the resource group. The name is case insensitive.
The name of the API Management service.
Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.
Type of API to create.
API identifier of the source API.
Protocols over which API is made available.
Specifies whether an API or Product subscription is required for accessing the API.
A URL to the Terms of Service for the API. MUST be in the format of a URL.
Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'
Workspace identifier. Must be unique in the current API Management service instance.
Criteria to limit import of WSDL to a subset of the document.