1. Packages
  2. Azure Native
  3. API Docs
  4. security
  5. APICollection
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

azure-native.security.APICollection

Explore with Pulumi AI

azure-native logo
This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi

    An API collection as represented by Defender for APIs. Azure REST 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",
        });
    
    });
    
    package main
    
    import (
    	security "github.com/pulumi/pulumi-azure-native-sdk/security/v2"
    	"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
    	})
    }
    
    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());
    
        }
    }
    
    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")
    
    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",
    });
    
    resources:
      apiCollection:
        type: azure-native:security:APICollection
        properties:
          apiCollectionId: echo-api
          resourceGroupName: rg1
          serviceName: apimService1
    

    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 string
    The unique name of the resource.
    args APICollectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args APICollectionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args APICollectionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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",
    });
    
    example, err := security.NewAPICollection(ctx, "apicollectionResource", &security.APICollectionArgs{
    ResourceGroupName: pulumi.String("string"),
    ServiceName: pulumi.String("string"),
    ApiCollectionId: pulumi.String("string"),
    })
    
    var apicollectionResource = new APICollection("apicollectionResource", APICollectionArgs.builder()
        .resourceGroupName("string")
        .serviceName("string")
        .apiCollectionId("string")
        .build());
    
    apicollection_resource = azure_native.security.APICollection("apicollectionResource",
        resource_group_name="string",
        service_name="string",
        api_collection_id="string")
    
    const apicollectionResource = new azure_native.security.APICollection("apicollectionResource", {
        resourceGroupName: "string",
        serviceName: "string",
        apiCollectionId: "string",
    });
    
    type: azure-native:security:APICollection
    properties:
        apiCollectionId: string
        resourceGroupName: string
        serviceName: string
    

    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

    The APICollection resource accepts the following input properties:

    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    ServiceName string
    The name of the API Management service.
    ApiCollectionId string
    A string representing the apiCollections resource within the Microsoft.Security provider namespace. This string matches the Azure API Management API name.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    ServiceName string
    The name of the API Management service.
    ApiCollectionId string
    A string representing the apiCollections resource within the Microsoft.Security provider namespace. This string matches the Azure API Management API name.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    serviceName String
    The name of the API Management service.
    apiCollectionId String
    A string representing the apiCollections resource within the Microsoft.Security provider namespace. This string matches the Azure API Management API name.
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    serviceName string
    The name of the API Management service.
    apiCollectionId 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 str
    The name of the resource group. The name is case insensitive.
    service_name str
    The name of the API Management service.
    api_collection_id str
    A string representing the apiCollections resource within the Microsoft.Security provider namespace. This string matches the Azure API Management API name.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    serviceName String
    The name of the API Management service.
    apiCollectionId 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:

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

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

    Package Details

    Repository
    Azure Native pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native logo
    This is the latest version of Azure Native. Use the Azure Native v1 docs if using the v1 version of this package.
    Azure Native v2.47.1 published on Monday, Jun 24, 2024 by Pulumi