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

We recommend using Azure Native.

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

azure.apimanagement.ApiOperationTag

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 a API Management API Operation Tag.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleApi = Azure.ApiManagement.GetApi.Invoke(new()
        {
            Name = "search-api",
            ApiManagementName = "search-api-management",
            ResourceGroupName = "search-service",
            Revision = "2",
        });
    
        var exampleApiOperation = new Azure.ApiManagement.ApiOperation("exampleApiOperation", new()
        {
            OperationId = "user-delete",
            ApiName = exampleApi.Apply(getApiResult => getApiResult.Name),
            ApiManagementName = exampleApi.Apply(getApiResult => getApiResult.ApiManagementName),
            ResourceGroupName = exampleApi.Apply(getApiResult => getApiResult.ResourceGroupName),
            DisplayName = "Delete User Operation",
            Method = "DELETE",
            UrlTemplate = "/users/{id}/delete",
            Description = "This can only be done by the logged in user.",
            Responses = new[]
            {
                new Azure.ApiManagement.Inputs.ApiOperationResponseArgs
                {
                    StatusCode = 200,
                },
            },
        });
    
        var exampleApiOperationTag = new Azure.ApiManagement.ApiOperationTag("exampleApiOperationTag", new()
        {
            ApiOperationId = exampleApiOperation.Id,
            DisplayName = "example-Tag",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/apimanagement"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleApi, err := apimanagement.LookupApi(ctx, &apimanagement.LookupApiArgs{
    			Name:              "search-api",
    			ApiManagementName: "search-api-management",
    			ResourceGroupName: "search-service",
    			Revision:          "2",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		exampleApiOperation, err := apimanagement.NewApiOperation(ctx, "exampleApiOperation", &apimanagement.ApiOperationArgs{
    			OperationId:       pulumi.String("user-delete"),
    			ApiName:           *pulumi.String(exampleApi.Name),
    			ApiManagementName: *pulumi.String(exampleApi.ApiManagementName),
    			ResourceGroupName: *pulumi.String(exampleApi.ResourceGroupName),
    			DisplayName:       pulumi.String("Delete User Operation"),
    			Method:            pulumi.String("DELETE"),
    			UrlTemplate:       pulumi.String("/users/{id}/delete"),
    			Description:       pulumi.String("This can only be done by the logged in user."),
    			Responses: apimanagement.ApiOperationResponseArray{
    				&apimanagement.ApiOperationResponseArgs{
    					StatusCode: pulumi.Int(200),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = apimanagement.NewApiOperationTag(ctx, "exampleApiOperationTag", &apimanagement.ApiOperationTagArgs{
    			ApiOperationId: exampleApiOperation.ID(),
    			DisplayName:    pulumi.String("example-Tag"),
    		})
    		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.apimanagement.ApimanagementFunctions;
    import com.pulumi.azure.apimanagement.inputs.GetApiArgs;
    import com.pulumi.azure.apimanagement.ApiOperation;
    import com.pulumi.azure.apimanagement.ApiOperationArgs;
    import com.pulumi.azure.apimanagement.inputs.ApiOperationResponseArgs;
    import com.pulumi.azure.apimanagement.ApiOperationTag;
    import com.pulumi.azure.apimanagement.ApiOperationTagArgs;
    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) {
            final var exampleApi = ApimanagementFunctions.getApi(GetApiArgs.builder()
                .name("search-api")
                .apiManagementName("search-api-management")
                .resourceGroupName("search-service")
                .revision("2")
                .build());
    
            var exampleApiOperation = new ApiOperation("exampleApiOperation", ApiOperationArgs.builder()        
                .operationId("user-delete")
                .apiName(exampleApi.applyValue(getApiResult -> getApiResult.name()))
                .apiManagementName(exampleApi.applyValue(getApiResult -> getApiResult.apiManagementName()))
                .resourceGroupName(exampleApi.applyValue(getApiResult -> getApiResult.resourceGroupName()))
                .displayName("Delete User Operation")
                .method("DELETE")
                .urlTemplate("/users/{id}/delete")
                .description("This can only be done by the logged in user.")
                .responses(ApiOperationResponseArgs.builder()
                    .statusCode(200)
                    .build())
                .build());
    
            var exampleApiOperationTag = new ApiOperationTag("exampleApiOperationTag", ApiOperationTagArgs.builder()        
                .apiOperationId(exampleApiOperation.id())
                .displayName("example-Tag")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example_api = azure.apimanagement.get_api(name="search-api",
        api_management_name="search-api-management",
        resource_group_name="search-service",
        revision="2")
    example_api_operation = azure.apimanagement.ApiOperation("exampleApiOperation",
        operation_id="user-delete",
        api_name=example_api.name,
        api_management_name=example_api.api_management_name,
        resource_group_name=example_api.resource_group_name,
        display_name="Delete User Operation",
        method="DELETE",
        url_template="/users/{id}/delete",
        description="This can only be done by the logged in user.",
        responses=[azure.apimanagement.ApiOperationResponseArgs(
            status_code=200,
        )])
    example_api_operation_tag = azure.apimanagement.ApiOperationTag("exampleApiOperationTag",
        api_operation_id=example_api_operation.id,
        display_name="example-Tag")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleApi = azure.apimanagement.getApi({
        name: "search-api",
        apiManagementName: "search-api-management",
        resourceGroupName: "search-service",
        revision: "2",
    });
    const exampleApiOperation = new azure.apimanagement.ApiOperation("exampleApiOperation", {
        operationId: "user-delete",
        apiName: exampleApi.then(exampleApi => exampleApi.name),
        apiManagementName: exampleApi.then(exampleApi => exampleApi.apiManagementName),
        resourceGroupName: exampleApi.then(exampleApi => exampleApi.resourceGroupName),
        displayName: "Delete User Operation",
        method: "DELETE",
        urlTemplate: "/users/{id}/delete",
        description: "This can only be done by the logged in user.",
        responses: [{
            statusCode: 200,
        }],
    });
    const exampleApiOperationTag = new azure.apimanagement.ApiOperationTag("exampleApiOperationTag", {
        apiOperationId: exampleApiOperation.id,
        displayName: "example-Tag",
    });
    
    resources:
      exampleApiOperation:
        type: azure:apimanagement:ApiOperation
        properties:
          operationId: user-delete
          apiName: ${exampleApi.name}
          apiManagementName: ${exampleApi.apiManagementName}
          resourceGroupName: ${exampleApi.resourceGroupName}
          displayName: Delete User Operation
          method: DELETE
          urlTemplate: /users/{id}/delete
          description: This can only be done by the logged in user.
          responses:
            - statusCode: 200
      exampleApiOperationTag:
        type: azure:apimanagement:ApiOperationTag
        properties:
          apiOperationId: ${exampleApiOperation.id}
          displayName: example-Tag
    variables:
      exampleApi:
        fn::invoke:
          Function: azure:apimanagement:getApi
          Arguments:
            name: search-api
            apiManagementName: search-api-management
            resourceGroupName: search-service
            revision: '2'
    

    Create ApiOperationTag Resource

    new ApiOperationTag(name: string, args: ApiOperationTagArgs, opts?: CustomResourceOptions);
    @overload
    def ApiOperationTag(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        api_operation_id: Optional[str] = None,
                        display_name: Optional[str] = None,
                        name: Optional[str] = None)
    @overload
    def ApiOperationTag(resource_name: str,
                        args: ApiOperationTagArgs,
                        opts: Optional[ResourceOptions] = None)
    func NewApiOperationTag(ctx *Context, name string, args ApiOperationTagArgs, opts ...ResourceOption) (*ApiOperationTag, error)
    public ApiOperationTag(string name, ApiOperationTagArgs args, CustomResourceOptions? opts = null)
    public ApiOperationTag(String name, ApiOperationTagArgs args)
    public ApiOperationTag(String name, ApiOperationTagArgs args, CustomResourceOptions options)
    
    type: azure:apimanagement:ApiOperationTag
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ApiOperationTagArgs
    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 ApiOperationTagArgs
    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 ApiOperationTagArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ApiOperationTagArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ApiOperationTagArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    ApiOperationId string

    The ID of the API Management API Operation. Changing this forces a new API Management API Operation Tag to be created.

    DisplayName string

    The display name of the API Management API Operation Tag.

    Name string

    The name which should be used for this API Management API Operation Tag. Changing this forces a new API Management API Operation Tag to be created. The name must be unique in the API Management Service.

    ApiOperationId string

    The ID of the API Management API Operation. Changing this forces a new API Management API Operation Tag to be created.

    DisplayName string

    The display name of the API Management API Operation Tag.

    Name string

    The name which should be used for this API Management API Operation Tag. Changing this forces a new API Management API Operation Tag to be created. The name must be unique in the API Management Service.

    apiOperationId String

    The ID of the API Management API Operation. Changing this forces a new API Management API Operation Tag to be created.

    displayName String

    The display name of the API Management API Operation Tag.

    name String

    The name which should be used for this API Management API Operation Tag. Changing this forces a new API Management API Operation Tag to be created. The name must be unique in the API Management Service.

    apiOperationId string

    The ID of the API Management API Operation. Changing this forces a new API Management API Operation Tag to be created.

    displayName string

    The display name of the API Management API Operation Tag.

    name string

    The name which should be used for this API Management API Operation Tag. Changing this forces a new API Management API Operation Tag to be created. The name must be unique in the API Management Service.

    api_operation_id str

    The ID of the API Management API Operation. Changing this forces a new API Management API Operation Tag to be created.

    display_name str

    The display name of the API Management API Operation Tag.

    name str

    The name which should be used for this API Management API Operation Tag. Changing this forces a new API Management API Operation Tag to be created. The name must be unique in the API Management Service.

    apiOperationId String

    The ID of the API Management API Operation. Changing this forces a new API Management API Operation Tag to be created.

    displayName String

    The display name of the API Management API Operation Tag.

    name String

    The name which should be used for this API Management API Operation Tag. Changing this forces a new API Management API Operation Tag to be created. The name must be unique in the API Management Service.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ApiOperationTag 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 ApiOperationTag Resource

    Get an existing ApiOperationTag 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?: ApiOperationTagState, opts?: CustomResourceOptions): ApiOperationTag
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            api_operation_id: Optional[str] = None,
            display_name: Optional[str] = None,
            name: Optional[str] = None) -> ApiOperationTag
    func GetApiOperationTag(ctx *Context, name string, id IDInput, state *ApiOperationTagState, opts ...ResourceOption) (*ApiOperationTag, error)
    public static ApiOperationTag Get(string name, Input<string> id, ApiOperationTagState? state, CustomResourceOptions? opts = null)
    public static ApiOperationTag get(String name, Output<String> id, ApiOperationTagState 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:
    ApiOperationId string

    The ID of the API Management API Operation. Changing this forces a new API Management API Operation Tag to be created.

    DisplayName string

    The display name of the API Management API Operation Tag.

    Name string

    The name which should be used for this API Management API Operation Tag. Changing this forces a new API Management API Operation Tag to be created. The name must be unique in the API Management Service.

    ApiOperationId string

    The ID of the API Management API Operation. Changing this forces a new API Management API Operation Tag to be created.

    DisplayName string

    The display name of the API Management API Operation Tag.

    Name string

    The name which should be used for this API Management API Operation Tag. Changing this forces a new API Management API Operation Tag to be created. The name must be unique in the API Management Service.

    apiOperationId String

    The ID of the API Management API Operation. Changing this forces a new API Management API Operation Tag to be created.

    displayName String

    The display name of the API Management API Operation Tag.

    name String

    The name which should be used for this API Management API Operation Tag. Changing this forces a new API Management API Operation Tag to be created. The name must be unique in the API Management Service.

    apiOperationId string

    The ID of the API Management API Operation. Changing this forces a new API Management API Operation Tag to be created.

    displayName string

    The display name of the API Management API Operation Tag.

    name string

    The name which should be used for this API Management API Operation Tag. Changing this forces a new API Management API Operation Tag to be created. The name must be unique in the API Management Service.

    api_operation_id str

    The ID of the API Management API Operation. Changing this forces a new API Management API Operation Tag to be created.

    display_name str

    The display name of the API Management API Operation Tag.

    name str

    The name which should be used for this API Management API Operation Tag. Changing this forces a new API Management API Operation Tag to be created. The name must be unique in the API Management Service.

    apiOperationId String

    The ID of the API Management API Operation. Changing this forces a new API Management API Operation Tag to be created.

    displayName String

    The display name of the API Management API Operation Tag.

    name String

    The name which should be used for this API Management API Operation Tag. Changing this forces a new API Management API Operation Tag to be created. The name must be unique in the API Management Service.

    Import

    API Management API Operation Tags can be imported using the resource id, e.g.

     $ pulumi import azure:apimanagement/apiOperationTag:ApiOperationTag example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/service1/apis/api1/operations/operation1/tags/tag1
    

    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