1. Packages
  2. Packages
  3. Azure Classic
  4. API Docs
  5. apimanagement
  6. ApiVersionSet

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Manages an API Version Set within an API Management Service.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
            {
                Location = "West Europe",
            });
            var exampleService = new Azure.ApiManagement.Service("exampleService", new Azure.ApiManagement.ServiceArgs
            {
                Location = exampleResourceGroup.Location,
                ResourceGroupName = exampleResourceGroup.Name,
                PublisherName = "pub1",
                PublisherEmail = "pub1@email.com",
                SkuName = "Developer_1",
            });
            var exampleApiVersionSet = new Azure.ApiManagement.ApiVersionSet("exampleApiVersionSet", new Azure.ApiManagement.ApiVersionSetArgs
            {
                ResourceGroupName = exampleResourceGroup.Name,
                ApiManagementName = exampleService.Name,
                DisplayName = "ExampleAPIVersionSet",
                VersioningScheme = "Segment",
            });
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/apimanagement"
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleService, err := apimanagement.NewService(ctx, "exampleService", &apimanagement.ServiceArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			PublisherName:     pulumi.String("pub1"),
    			PublisherEmail:    pulumi.String("pub1@email.com"),
    			SkuName:           pulumi.String("Developer_1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = apimanagement.NewApiVersionSet(ctx, "exampleApiVersionSet", &apimanagement.ApiVersionSetArgs{
    			ResourceGroupName: exampleResourceGroup.Name,
    			ApiManagementName: exampleService.Name,
    			DisplayName:       pulumi.String("ExampleAPIVersionSet"),
    			VersioningScheme:  pulumi.String("Segment"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleService = new azure.apimanagement.Service("exampleService", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        publisherName: "pub1",
        publisherEmail: "pub1@email.com",
        skuName: "Developer_1",
    });
    const exampleApiVersionSet = new azure.apimanagement.ApiVersionSet("exampleApiVersionSet", {
        resourceGroupName: exampleResourceGroup.name,
        apiManagementName: exampleService.name,
        displayName: "ExampleAPIVersionSet",
        versioningScheme: "Segment",
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_service = azure.apimanagement.Service("exampleService",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        publisher_name="pub1",
        publisher_email="pub1@email.com",
        sku_name="Developer_1")
    example_api_version_set = azure.apimanagement.ApiVersionSet("exampleApiVersionSet",
        resource_group_name=example_resource_group.name,
        api_management_name=example_service.name,
        display_name="ExampleAPIVersionSet",
        versioning_scheme="Segment")
    

    Example coming soon!

    Create ApiVersionSet Resource

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

    Constructor syntax

    new ApiVersionSet(name: string, args: ApiVersionSetArgs, opts?: CustomResourceOptions);
    @overload
    def ApiVersionSet(resource_name: str,
                      args: ApiVersionSetArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def ApiVersionSet(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      api_management_name: Optional[str] = None,
                      display_name: Optional[str] = None,
                      resource_group_name: Optional[str] = None,
                      versioning_scheme: Optional[str] = None,
                      description: Optional[str] = None,
                      name: Optional[str] = None,
                      version_header_name: Optional[str] = None,
                      version_query_name: Optional[str] = None)
    func NewApiVersionSet(ctx *Context, name string, args ApiVersionSetArgs, opts ...ResourceOption) (*ApiVersionSet, error)
    public ApiVersionSet(string name, ApiVersionSetArgs args, CustomResourceOptions? opts = null)
    public ApiVersionSet(String name, ApiVersionSetArgs args)
    public ApiVersionSet(String name, ApiVersionSetArgs args, CustomResourceOptions options)
    
    type: azure:apimanagement:ApiVersionSet
    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 ApiVersionSetArgs
    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 ApiVersionSetArgs
    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 ApiVersionSetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiVersionSetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiVersionSetArgs
    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 apiVersionSetResource = new Azure.ApiManagement.ApiVersionSet("apiVersionSetResource", new()
    {
        ApiManagementName = "string",
        DisplayName = "string",
        ResourceGroupName = "string",
        VersioningScheme = "string",
        Description = "string",
        Name = "string",
        VersionHeaderName = "string",
        VersionQueryName = "string",
    });
    
    example, err := apimanagement.NewApiVersionSet(ctx, "apiVersionSetResource", &apimanagement.ApiVersionSetArgs{
    	ApiManagementName: pulumi.String("string"),
    	DisplayName:       pulumi.String("string"),
    	ResourceGroupName: pulumi.String("string"),
    	VersioningScheme:  pulumi.String("string"),
    	Description:       pulumi.String("string"),
    	Name:              pulumi.String("string"),
    	VersionHeaderName: pulumi.String("string"),
    	VersionQueryName:  pulumi.String("string"),
    })
    
    var apiVersionSetResource = new ApiVersionSet("apiVersionSetResource", ApiVersionSetArgs.builder()
        .apiManagementName("string")
        .displayName("string")
        .resourceGroupName("string")
        .versioningScheme("string")
        .description("string")
        .name("string")
        .versionHeaderName("string")
        .versionQueryName("string")
        .build());
    
    api_version_set_resource = azure.apimanagement.ApiVersionSet("apiVersionSetResource",
        api_management_name="string",
        display_name="string",
        resource_group_name="string",
        versioning_scheme="string",
        description="string",
        name="string",
        version_header_name="string",
        version_query_name="string")
    
    const apiVersionSetResource = new azure.apimanagement.ApiVersionSet("apiVersionSetResource", {
        apiManagementName: "string",
        displayName: "string",
        resourceGroupName: "string",
        versioningScheme: "string",
        description: "string",
        name: "string",
        versionHeaderName: "string",
        versionQueryName: "string",
    });
    
    type: azure:apimanagement:ApiVersionSet
    properties:
        apiManagementName: string
        description: string
        displayName: string
        name: string
        resourceGroupName: string
        versionHeaderName: string
        versionQueryName: string
        versioningScheme: string
    

    ApiVersionSet 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 ApiVersionSet resource accepts the following input properties:

    ApiManagementName string
    The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
    DisplayName string
    The display name of this API Version Set.
    ResourceGroupName string
    The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
    VersioningScheme string
    Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are Header, Query and Segment.
    Description string
    The description of API Version Set.
    Name string
    The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
    VersionHeaderName string
    The name of the Header which should be read from Inbound Requests which defines the API Version.
    VersionQueryName string
    The name of the Query String which should be read from Inbound Requests which defines the API Version.
    ApiManagementName string
    The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
    DisplayName string
    The display name of this API Version Set.
    ResourceGroupName string
    The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
    VersioningScheme string
    Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are Header, Query and Segment.
    Description string
    The description of API Version Set.
    Name string
    The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
    VersionHeaderName string
    The name of the Header which should be read from Inbound Requests which defines the API Version.
    VersionQueryName string
    The name of the Query String which should be read from Inbound Requests which defines the API Version.
    apiManagementName String
    The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
    displayName String
    The display name of this API Version Set.
    resourceGroupName String
    The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
    versioningScheme String
    Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are Header, Query and Segment.
    description String
    The description of API Version Set.
    name String
    The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
    versionHeaderName String
    The name of the Header which should be read from Inbound Requests which defines the API Version.
    versionQueryName String
    The name of the Query String which should be read from Inbound Requests which defines the API Version.
    apiManagementName string
    The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
    displayName string
    The display name of this API Version Set.
    resourceGroupName string
    The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
    versioningScheme string
    Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are Header, Query and Segment.
    description string
    The description of API Version Set.
    name string
    The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
    versionHeaderName string
    The name of the Header which should be read from Inbound Requests which defines the API Version.
    versionQueryName string
    The name of the Query String which should be read from Inbound Requests which defines the API Version.
    api_management_name str
    The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
    display_name str
    The display name of this API Version Set.
    resource_group_name str
    The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
    versioning_scheme str
    Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are Header, Query and Segment.
    description str
    The description of API Version Set.
    name str
    The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
    version_header_name str
    The name of the Header which should be read from Inbound Requests which defines the API Version.
    version_query_name str
    The name of the Query String which should be read from Inbound Requests which defines the API Version.
    apiManagementName String
    The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
    displayName String
    The display name of this API Version Set.
    resourceGroupName String
    The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
    versioningScheme String
    Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are Header, Query and Segment.
    description String
    The description of API Version Set.
    name String
    The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
    versionHeaderName String
    The name of the Header which should be read from Inbound Requests which defines the API Version.
    versionQueryName String
    The name of the Query String which should be read from Inbound Requests which defines the API Version.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ApiVersionSet Resource

    Get an existing ApiVersionSet resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ApiVersionSetState, opts?: CustomResourceOptions): ApiVersionSet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_management_name: Optional[str] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            version_header_name: Optional[str] = None,
            version_query_name: Optional[str] = None,
            versioning_scheme: Optional[str] = None) -> ApiVersionSet
    func GetApiVersionSet(ctx *Context, name string, id IDInput, state *ApiVersionSetState, opts ...ResourceOption) (*ApiVersionSet, error)
    public static ApiVersionSet Get(string name, Input<string> id, ApiVersionSetState? state, CustomResourceOptions? opts = null)
    public static ApiVersionSet get(String name, Output<String> id, ApiVersionSetState state, CustomResourceOptions options)
    resources:  _:    type: azure:apimanagement:ApiVersionSet    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ApiManagementName string
    The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
    Description string
    The description of API Version Set.
    DisplayName string
    The display name of this API Version Set.
    Name string
    The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
    VersionHeaderName string
    The name of the Header which should be read from Inbound Requests which defines the API Version.
    VersionQueryName string
    The name of the Query String which should be read from Inbound Requests which defines the API Version.
    VersioningScheme string
    Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are Header, Query and Segment.
    ApiManagementName string
    The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
    Description string
    The description of API Version Set.
    DisplayName string
    The display name of this API Version Set.
    Name string
    The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
    ResourceGroupName string
    The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
    VersionHeaderName string
    The name of the Header which should be read from Inbound Requests which defines the API Version.
    VersionQueryName string
    The name of the Query String which should be read from Inbound Requests which defines the API Version.
    VersioningScheme string
    Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are Header, Query and Segment.
    apiManagementName String
    The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
    description String
    The description of API Version Set.
    displayName String
    The display name of this API Version Set.
    name String
    The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
    versionHeaderName String
    The name of the Header which should be read from Inbound Requests which defines the API Version.
    versionQueryName String
    The name of the Query String which should be read from Inbound Requests which defines the API Version.
    versioningScheme String
    Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are Header, Query and Segment.
    apiManagementName string
    The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
    description string
    The description of API Version Set.
    displayName string
    The display name of this API Version Set.
    name string
    The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
    resourceGroupName string
    The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
    versionHeaderName string
    The name of the Header which should be read from Inbound Requests which defines the API Version.
    versionQueryName string
    The name of the Query String which should be read from Inbound Requests which defines the API Version.
    versioningScheme string
    Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are Header, Query and Segment.
    api_management_name str
    The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
    description str
    The description of API Version Set.
    display_name str
    The display name of this API Version Set.
    name str
    The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
    resource_group_name str
    The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
    version_header_name str
    The name of the Header which should be read from Inbound Requests which defines the API Version.
    version_query_name str
    The name of the Query String which should be read from Inbound Requests which defines the API Version.
    versioning_scheme str
    Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are Header, Query and Segment.
    apiManagementName String
    The name of the API Management Service in which the API Version Set should exist. May only contain alphanumeric characters and dashes up to 50 characters in length. Changing this forces a new resource to be created.
    description String
    The description of API Version Set.
    displayName String
    The display name of this API Version Set.
    name String
    The name of the API Version Set. May only contain alphanumeric characters and dashes up to 80 characters in length. Changing this forces a new resource to be created.
    resourceGroupName String
    The name of the Resource Group in which the parent API Management Service exists. Changing this forces a new resource to be created.
    versionHeaderName String
    The name of the Header which should be read from Inbound Requests which defines the API Version.
    versionQueryName String
    The name of the Query String which should be read from Inbound Requests which defines the API Version.
    versioningScheme String
    Specifies where in an Inbound HTTP Request that the API Version should be read from. Possible values are Header, Query and Segment.

    Import

    API Version Set can be imported using the resource id, e.g.

     $ pulumi import azure:apimanagement/apiVersionSet:ApiVersionSet example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/apiVersionSets/set1
    

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

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.