1. Packages
  2. Azure Native v1
  3. API Docs
  4. apimanagement
  5. ContentType
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.apimanagement.ContentType

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    Content type contract details. API Version: 2020-12-01.

    Example Usage

    ApiManagementCreateContentType

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var contentType = new AzureNative.ApiManagement.ContentType("contentType", new()
        {
            ContentTypeId = "page",
            ResourceGroupName = "rg1",
            ServiceName = "apimService1",
        });
    
    });
    
    package main
    
    import (
    	apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := apimanagement.NewContentType(ctx, "contentType", &apimanagement.ContentTypeArgs{
    			ContentTypeId:     pulumi.String("page"),
    			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.apimanagement.ContentType;
    import com.pulumi.azurenative.apimanagement.ContentTypeArgs;
    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 contentType = new ContentType("contentType", ContentTypeArgs.builder()        
                .contentTypeId("page")
                .resourceGroupName("rg1")
                .serviceName("apimService1")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    content_type = azure_native.apimanagement.ContentType("contentType",
        content_type_id="page",
        resource_group_name="rg1",
        service_name="apimService1")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const contentType = new azure_native.apimanagement.ContentType("contentType", {
        contentTypeId: "page",
        resourceGroupName: "rg1",
        serviceName: "apimService1",
    });
    
    resources:
      contentType:
        type: azure-native:apimanagement:ContentType
        properties:
          contentTypeId: page
          resourceGroupName: rg1
          serviceName: apimService1
    

    Create ContentType Resource

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

    Constructor syntax

    new ContentType(name: string, args: ContentTypeArgs, opts?: CustomResourceOptions);
    @overload
    def ContentType(resource_name: str,
                    args: ContentTypeArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def ContentType(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    resource_group_name: Optional[str] = None,
                    service_name: Optional[str] = None,
                    content_type_id: Optional[str] = None)
    func NewContentType(ctx *Context, name string, args ContentTypeArgs, opts ...ResourceOption) (*ContentType, error)
    public ContentType(string name, ContentTypeArgs args, CustomResourceOptions? opts = null)
    public ContentType(String name, ContentTypeArgs args)
    public ContentType(String name, ContentTypeArgs args, CustomResourceOptions options)
    
    type: azure-native:apimanagement:ContentType
    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 ContentTypeArgs
    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 ContentTypeArgs
    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 ContentTypeArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ContentTypeArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ContentTypeArgs
    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 contentTypeResource = new AzureNative.Apimanagement.ContentType("contentTypeResource", new()
    {
        ResourceGroupName = "string",
        ServiceName = "string",
        ContentTypeId = "string",
    });
    
    example, err := apimanagement.NewContentType(ctx, "contentTypeResource", &apimanagement.ContentTypeArgs{
    	ResourceGroupName: "string",
    	ServiceName:       "string",
    	ContentTypeId:     "string",
    })
    
    var contentTypeResource = new ContentType("contentTypeResource", ContentTypeArgs.builder()
        .resourceGroupName("string")
        .serviceName("string")
        .contentTypeId("string")
        .build());
    
    content_type_resource = azure_native.apimanagement.ContentType("contentTypeResource",
        resource_group_name=string,
        service_name=string,
        content_type_id=string)
    
    const contentTypeResource = new azure_native.apimanagement.ContentType("contentTypeResource", {
        resourceGroupName: "string",
        serviceName: "string",
        contentTypeId: "string",
    });
    
    type: azure-native:apimanagement:ContentType
    properties:
        contentTypeId: string
        resourceGroupName: string
        serviceName: string
    

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

    ResourceGroupName string
    The name of the resource group.
    ServiceName string
    The name of the API Management service.
    ContentTypeId string
    Content type identifier.
    ResourceGroupName string
    The name of the resource group.
    ServiceName string
    The name of the API Management service.
    ContentTypeId string
    Content type identifier.
    resourceGroupName String
    The name of the resource group.
    serviceName String
    The name of the API Management service.
    contentTypeId String
    Content type identifier.
    resourceGroupName string
    The name of the resource group.
    serviceName string
    The name of the API Management service.
    contentTypeId string
    Content type identifier.
    resource_group_name str
    The name of the resource group.
    service_name str
    The name of the API Management service.
    content_type_id str
    Content type identifier.
    resourceGroupName String
    The name of the resource group.
    serviceName String
    The name of the API Management service.
    contentTypeId String
    Content type identifier.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ContentType 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 for API Management resource.
    Description string
    Content type description.
    Schema object
    Content type schema.
    Version string
    Content type version.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Resource name.
    Type string
    Resource type for API Management resource.
    Description string
    Content type description.
    Schema interface{}
    Content type schema.
    Version string
    Content type version.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name.
    type String
    Resource type for API Management resource.
    description String
    Content type description.
    schema Object
    Content type schema.
    version String
    Content type version.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Resource name.
    type string
    Resource type for API Management resource.
    description string
    Content type description.
    schema any
    Content type schema.
    version string
    Content type version.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Resource name.
    type str
    Resource type for API Management resource.
    description str
    Content type description.
    schema Any
    Content type schema.
    version str
    Content type version.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Resource name.
    type String
    Resource type for API Management resource.
    description String
    Content type description.
    schema Any
    Content type schema.
    version String
    Content type version.

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:apimanagement:ContentType page /contentTypes/page 
    

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

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi