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

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

azure.apimanagement.ApiVersionSet

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi

    Manages an API Version Set within an API Management Service.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
        {
            Location = "West Europe",
        });
    
        var exampleService = new Azure.ApiManagement.Service("exampleService", new()
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            PublisherName = "pub1",
            PublisherEmail = "pub1@email.com",
            SkuName = "Developer_1",
        });
    
        var exampleApiVersionSet = new Azure.ApiManagement.ApiVersionSet("exampleApiVersionSet", new()
        {
            ResourceGroupName = exampleResourceGroup.Name,
            ApiManagementName = exampleService.Name,
            DisplayName = "ExampleAPIVersionSet",
            VersioningScheme = "Segment",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/apimanagement"
    	"github.com/pulumi/pulumi-azure/sdk/v5/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
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.apimanagement.Service;
    import com.pulumi.azure.apimanagement.ServiceArgs;
    import com.pulumi.azure.apimanagement.ApiVersionSet;
    import com.pulumi.azure.apimanagement.ApiVersionSetArgs;
    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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()        
                .location("West Europe")
                .build());
    
            var exampleService = new Service("exampleService", ServiceArgs.builder()        
                .location(exampleResourceGroup.location())
                .resourceGroupName(exampleResourceGroup.name())
                .publisherName("pub1")
                .publisherEmail("pub1@email.com")
                .skuName("Developer_1")
                .build());
    
            var exampleApiVersionSet = new ApiVersionSet("exampleApiVersionSet", ApiVersionSetArgs.builder()        
                .resourceGroupName(exampleResourceGroup.name())
                .apiManagementName(exampleService.name())
                .displayName("ExampleAPIVersionSet")
                .versioningScheme("Segment")
                .build());
    
        }
    }
    
    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")
    
    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",
    });
    
    resources:
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        properties:
          location: West Europe
      exampleService:
        type: azure:apimanagement:Service
        properties:
          location: ${exampleResourceGroup.location}
          resourceGroupName: ${exampleResourceGroup.name}
          publisherName: pub1
          publisherEmail: pub1@email.com
          skuName: Developer_1
      exampleApiVersionSet:
        type: azure:apimanagement:ApiVersionSet
        properties:
          resourceGroupName: ${exampleResourceGroup.name}
          apiManagementName: ${exampleService.name}
          displayName: ExampleAPIVersionSet
          versioningScheme: Segment
    

    Create ApiVersionSet Resource

    new ApiVersionSet(name: string, args: ApiVersionSetArgs, opts?: CustomResourceOptions);
    @overload
    def ApiVersionSet(resource_name: 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)
    @overload
    def ApiVersionSet(resource_name: str,
                      args: ApiVersionSetArgs,
                      opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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

    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.

    NOTE: This must be specified when versioning_scheme is set to Header.

    VersionQueryName string

    The name of the Query String which should be read from Inbound Requests which defines the API Version.

    NOTE: This must be specified when versioning_scheme is set to Query.

    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.

    NOTE: This must be specified when versioning_scheme is set to Header.

    VersionQueryName string

    The name of the Query String which should be read from Inbound Requests which defines the API Version.

    NOTE: This must be specified when versioning_scheme is set to Query.

    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.

    NOTE: This must be specified when versioning_scheme is set to Header.

    versionQueryName String

    The name of the Query String which should be read from Inbound Requests which defines the API Version.

    NOTE: This must be specified when versioning_scheme is set to Query.

    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.

    NOTE: This must be specified when versioning_scheme is set to Header.

    versionQueryName string

    The name of the Query String which should be read from Inbound Requests which defines the API Version.

    NOTE: This must be specified when versioning_scheme is set to Query.

    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.

    NOTE: This must be specified when versioning_scheme is set to Header.

    version_query_name str

    The name of the Query String which should be read from Inbound Requests which defines the API Version.

    NOTE: This must be specified when versioning_scheme is set to Query.

    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.

    NOTE: This must be specified when versioning_scheme is set to Header.

    versionQueryName String

    The name of the Query String which should be read from Inbound Requests which defines the API Version.

    NOTE: This must be specified when versioning_scheme is set to Query.

    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)
    Resource lookup is not supported in YAML
    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.

    NOTE: This must be specified when versioning_scheme is set to Header.

    VersionQueryName string

    The name of the Query String which should be read from Inbound Requests which defines the API Version.

    NOTE: This must be specified when versioning_scheme is set to Query.

    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.

    NOTE: This must be specified when versioning_scheme is set to Header.

    VersionQueryName string

    The name of the Query String which should be read from Inbound Requests which defines the API Version.

    NOTE: This must be specified when versioning_scheme is set to Query.

    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.

    NOTE: This must be specified when versioning_scheme is set to Header.

    versionQueryName String

    The name of the Query String which should be read from Inbound Requests which defines the API Version.

    NOTE: This must be specified when versioning_scheme is set to Query.

    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.

    NOTE: This must be specified when versioning_scheme is set to Header.

    versionQueryName string

    The name of the Query String which should be read from Inbound Requests which defines the API Version.

    NOTE: This must be specified when versioning_scheme is set to Query.

    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.

    NOTE: This must be specified when versioning_scheme is set to Header.

    version_query_name str

    The name of the Query String which should be read from Inbound Requests which defines the API Version.

    NOTE: This must be specified when versioning_scheme is set to Query.

    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.

    NOTE: This must be specified when versioning_scheme is set to Header.

    versionQueryName String

    The name of the Query String which should be read from Inbound Requests which defines the API Version.

    NOTE: This must be specified when versioning_scheme is set to Query.

    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
    

    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.

    Azure Classic v5.49.0 published on Tuesday, Aug 29, 2023 by Pulumi