1. Packages
  2. Azure Native
  3. API Docs
  4. security
  5. APICollection
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

azure-native.security.APICollection

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi

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",
    });

});
Copy
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
	})
}
Copy
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());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const apiCollection = new azure_native.security.APICollection("apiCollection", {
    apiCollectionId: "echo-api",
    resourceGroupName: "rg1",
    serviceName: "apimService1",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

api_collection = azure_native.security.APICollection("apiCollection",
    api_collection_id="echo-api",
    resource_group_name="rg1",
    service_name="apimService1")
Copy
resources:
  apiCollection:
    type: azure-native:security:APICollection
    properties:
      apiCollectionId: echo-api
      resourceGroupName: rg1
      serviceName: apimService1
Copy

Create APICollection Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new APICollection(name: string, args: APICollectionArgs, opts?: CustomResourceOptions);
@overload
def APICollection(resource_name: str,
                  args: APICollectionArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def APICollection(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  resource_group_name: Optional[str] = None,
                  service_name: Optional[str] = None,
                  api_collection_id: Optional[str] = None)
func NewAPICollection(ctx *Context, name string, args APICollectionArgs, opts ...ResourceOption) (*APICollection, error)
public APICollection(string name, APICollectionArgs args, CustomResourceOptions? opts = null)
public APICollection(String name, APICollectionArgs args)
public APICollection(String name, APICollectionArgs args, CustomResourceOptions options)
type: azure-native:security:APICollection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. APICollectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. APICollectionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. APICollectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. APICollectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. APICollectionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var apicollectionResource = new AzureNative.Security.APICollection("apicollectionResource", new()
{
    ResourceGroupName = "string",
    ServiceName = "string",
    ApiCollectionId = "string",
});
Copy
example, err := security.NewAPICollection(ctx, "apicollectionResource", &security.APICollectionArgs{
	ResourceGroupName: pulumi.String("string"),
	ServiceName:       pulumi.String("string"),
	ApiCollectionId:   pulumi.String("string"),
})
Copy
var apicollectionResource = new APICollection("apicollectionResource", APICollectionArgs.builder()
    .resourceGroupName("string")
    .serviceName("string")
    .apiCollectionId("string")
    .build());
Copy
apicollection_resource = azure_native.security.APICollection("apicollectionResource",
    resource_group_name="string",
    service_name="string",
    api_collection_id="string")
Copy
const apicollectionResource = new azure_native.security.APICollection("apicollectionResource", {
    resourceGroupName: "string",
    serviceName: "string",
    apiCollectionId: "string",
});
Copy
type: azure-native:security:APICollection
properties:
    apiCollectionId: string
    resourceGroupName: string
    serviceName: string
Copy

APICollection Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The APICollection resource accepts the following input properties:

ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the API Management service.
ApiCollectionId Changes to this property will trigger replacement. string
A string representing the apiCollections resource within the Microsoft.Security provider namespace. This string matches the Azure API Management API name.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the API Management service.
ApiCollectionId Changes to this property will trigger replacement. string
A string representing the apiCollections resource within the Microsoft.Security provider namespace. This string matches the Azure API Management API name.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the API Management service.
apiCollectionId Changes to this property will trigger replacement. String
A string representing the apiCollections resource within the Microsoft.Security provider namespace. This string matches the Azure API Management API name.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
serviceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the API Management service.
apiCollectionId Changes to this property will trigger replacement. string
A string representing the apiCollections resource within the Microsoft.Security provider namespace. This string matches the Azure API Management API name.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group. The name is case insensitive.
service_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the API Management service.
api_collection_id Changes to this property will trigger replacement. str
A string representing the apiCollections resource within the Microsoft.Security provider namespace. This string matches the Azure API Management API name.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the API Management service.
apiCollectionId Changes to this property will trigger replacement. String
A string representing the apiCollections resource within the Microsoft.Security provider namespace. This string matches the Azure API Management API name.

Outputs

All input properties are implicitly available as output properties. Additionally, the APICollection resource produces the following output properties:

AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name
Type string
Resource type
AdditionalData Dictionary<string, string>
Additional data regarding the API collection.
DisplayName string
The display name of the Azure API Management API.
AzureApiVersion string
The Azure API version of the resource.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Resource name
Type string
Resource type
AdditionalData map[string]string
Additional data regarding the API collection.
DisplayName string
The display name of the Azure API Management API.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name
type String
Resource type
additionalData Map<String,String>
Additional data regarding the API collection.
displayName String
The display name of the Azure API Management API.
azureApiVersion string
The Azure API version of the resource.
id string
The provider-assigned unique ID for this managed resource.
name string
Resource name
type string
Resource type
additionalData {[key: string]: string}
Additional data regarding the API collection.
displayName string
The display name of the Azure API Management API.
azure_api_version str
The Azure API version of the resource.
id str
The provider-assigned unique ID for this managed resource.
name str
Resource name
type str
Resource type
additional_data Mapping[str, str]
Additional data regarding the API collection.
display_name str
The display name of the Azure API Management API.
azureApiVersion String
The Azure API version of the resource.
id String
The provider-assigned unique ID for this managed resource.
name String
Resource name
type String
Resource type
additionalData Map<String>
Additional data regarding the API collection.
displayName String
The display name of the Azure API Management API.

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} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.2.0 published on Monday, Apr 14, 2025 by Pulumi