APICollection Args
data class APICollectionArgs(val apiCollectionId: Output<String>? = null, val resourceGroupName: Output<String>? = null, val serviceName: Output<String>? = null) : ConvertibleToJava<APICollectionArgs>
An API collection as represented by Defender for APIs. Uses Azure REST API version 2022-11-20-preview. In version 2.x of the Azure Native provider, it used API version 2022-11-20-preview.
Example Usage
Onboard an Azure API Management API to Defender for APIs
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var apiCollection = new AzureNative.Security.APICollection("apiCollection", new()
{
ApiCollectionId = "echo-api",
ResourceGroupName = "rg1",
ServiceName = "apimService1",
});
});
Content copied to clipboard
package main
import (
security "github.com/pulumi/pulumi-azure-native-sdk/security/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := security.NewAPICollection(ctx, "apiCollection", &security.APICollectionArgs{
ApiCollectionId: pulumi.String("echo-api"),
ResourceGroupName: pulumi.String("rg1"),
ServiceName: pulumi.String("apimService1"),
})
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.security.APICollection;
import com.pulumi.azurenative.security.APICollectionArgs;
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 apiCollection = new APICollection("apiCollection", APICollectionArgs.builder()
.apiCollectionId("echo-api")
.resourceGroupName("rg1")
.serviceName("apimService1")
.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:security:APICollection echo-api /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/providers/Microsoft.Security/apiCollections/{apiCollectionId}
Content copied to clipboard
Properties
Link copied to clipboard
A string representing the apiCollections resource within the Microsoft.Security provider namespace. This string matches the Azure API Management API name.
Link copied to clipboard
The name of the resource group. The name is case insensitive.
Link copied to clipboard
The name of the API Management service.