1. Packages
  2. Azure Native
  3. API Docs
  4. apimanagement
  5. ContentType
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.37.0 published on Monday, Apr 15, 2024 by Pulumi

azure-native.apimanagement.ContentType

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.37.0 published on Monday, Apr 15, 2024 by Pulumi

    Content type contract details. Azure REST API version: 2022-08-01. Prior API version in Azure Native 1.x: 2020-12-01.

    Other available API versions: 2022-09-01-preview, 2023-03-01-preview, 2023-05-01-preview.

    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",
            Description = "A regular page",
            Name = "Page",
            ResourceGroupName = "rg1",
            Schema = new Dictionary<string, object?>
            {
                ["additionalProperties"] = false,
                ["properties"] = new Dictionary<string, object?>
                {
                    ["en_us"] = new Dictionary<string, object?>
                    {
                        ["additionalProperties"] = false,
                        ["properties"] = new Dictionary<string, object?>
                        {
                            ["description"] = new Dictionary<string, object?>
                            {
                                ["description"] = "Page description. This property gets included in SEO attributes.",
                                ["indexed"] = true,
                                ["title"] = "Description",
                                ["type"] = "string",
                            },
                            ["documentId"] = new Dictionary<string, object?>
                            {
                                ["description"] = "Reference to page content document.",
                                ["title"] = "Document ID",
                                ["type"] = "string",
                            },
                            ["keywords"] = new Dictionary<string, object?>
                            {
                                ["description"] = "Page keywords. This property gets included in SEO attributes.",
                                ["indexed"] = true,
                                ["title"] = "Keywords",
                                ["type"] = "string",
                            },
                            ["permalink"] = new Dictionary<string, object?>
                            {
                                ["description"] = "Page permalink, e.g. '/about'.",
                                ["indexed"] = true,
                                ["title"] = "Permalink",
                                ["type"] = "string",
                            },
                            ["title"] = new Dictionary<string, object?>
                            {
                                ["description"] = "Page title. This property gets included in SEO attributes.",
                                ["indexed"] = true,
                                ["title"] = "Title",
                                ["type"] = "string",
                            },
                        },
                        ["required"] = new[]
                        {
                            "title",
                            "permalink",
                            "documentId",
                        },
                        ["type"] = "object",
                    },
                },
            },
            ServiceName = "apimService1",
            Version = "1.0.0",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v2"
    	"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"),
    			Description:       pulumi.String("A regular page"),
    			Name:              pulumi.String("Page"),
    			ResourceGroupName: pulumi.String("rg1"),
    			Schema: pulumi.Any(map[string]interface{}{
    				"additionalProperties": false,
    				"properties": map[string]interface{}{
    					"en_us": map[string]interface{}{
    						"additionalProperties": false,
    						"properties": map[string]interface{}{
    							"description": map[string]interface{}{
    								"description": "Page description. This property gets included in SEO attributes.",
    								"indexed":     true,
    								"title":       "Description",
    								"type":        "string",
    							},
    							"documentId": map[string]interface{}{
    								"description": "Reference to page content document.",
    								"title":       "Document ID",
    								"type":        "string",
    							},
    							"keywords": map[string]interface{}{
    								"description": "Page keywords. This property gets included in SEO attributes.",
    								"indexed":     true,
    								"title":       "Keywords",
    								"type":        "string",
    							},
    							"permalink": map[string]interface{}{
    								"description": "Page permalink, e.g. '/about'.",
    								"indexed":     true,
    								"title":       "Permalink",
    								"type":        "string",
    							},
    							"title": map[string]interface{}{
    								"description": "Page title. This property gets included in SEO attributes.",
    								"indexed":     true,
    								"title":       "Title",
    								"type":        "string",
    							},
    						},
    						"required": []string{
    							"title",
    							"permalink",
    							"documentId",
    						},
    						"type": "object",
    					},
    				},
    			}),
    			ServiceName: pulumi.String("apimService1"),
    			Version:     pulumi.String("1.0.0"),
    		})
    		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")
                .description("A regular page")
                .name("Page")
                .resourceGroupName("rg1")
                .schema(Map.ofEntries(
                    Map.entry("additionalProperties", false),
                    Map.entry("properties", Map.of("en_us", Map.ofEntries(
                        Map.entry("additionalProperties", false),
                        Map.entry("properties", Map.ofEntries(
                            Map.entry("description", Map.ofEntries(
                                Map.entry("description", "Page description. This property gets included in SEO attributes."),
                                Map.entry("indexed", true),
                                Map.entry("title", "Description"),
                                Map.entry("type", "string")
                            )),
                            Map.entry("documentId", Map.ofEntries(
                                Map.entry("description", "Reference to page content document."),
                                Map.entry("title", "Document ID"),
                                Map.entry("type", "string")
                            )),
                            Map.entry("keywords", Map.ofEntries(
                                Map.entry("description", "Page keywords. This property gets included in SEO attributes."),
                                Map.entry("indexed", true),
                                Map.entry("title", "Keywords"),
                                Map.entry("type", "string")
                            )),
                            Map.entry("permalink", Map.ofEntries(
                                Map.entry("description", "Page permalink, e.g. '/about'."),
                                Map.entry("indexed", true),
                                Map.entry("title", "Permalink"),
                                Map.entry("type", "string")
                            )),
                            Map.entry("title", Map.ofEntries(
                                Map.entry("description", "Page title. This property gets included in SEO attributes."),
                                Map.entry("indexed", true),
                                Map.entry("title", "Title"),
                                Map.entry("type", "string")
                            ))
                        )),
                        Map.entry("required",                     
                            "title",
                            "permalink",
                            "documentId"),
                        Map.entry("type", "object")
                    )))
                ))
                .serviceName("apimService1")
                .version("1.0.0")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    content_type = azure_native.apimanagement.ContentType("contentType",
        content_type_id="page",
        description="A regular page",
        name="Page",
        resource_group_name="rg1",
        schema={
            "additionalProperties": False,
            "properties": {
                "en_us": {
                    "additionalProperties": False,
                    "properties": {
                        "description": {
                            "description": "Page description. This property gets included in SEO attributes.",
                            "indexed": True,
                            "title": "Description",
                            "type": "string",
                        },
                        "documentId": {
                            "description": "Reference to page content document.",
                            "title": "Document ID",
                            "type": "string",
                        },
                        "keywords": {
                            "description": "Page keywords. This property gets included in SEO attributes.",
                            "indexed": True,
                            "title": "Keywords",
                            "type": "string",
                        },
                        "permalink": {
                            "description": "Page permalink, e.g. '/about'.",
                            "indexed": True,
                            "title": "Permalink",
                            "type": "string",
                        },
                        "title": {
                            "description": "Page title. This property gets included in SEO attributes.",
                            "indexed": True,
                            "title": "Title",
                            "type": "string",
                        },
                    },
                    "required": [
                        "title",
                        "permalink",
                        "documentId",
                    ],
                    "type": "object",
                },
            },
        },
        service_name="apimService1",
        version="1.0.0")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const contentType = new azure_native.apimanagement.ContentType("contentType", {
        contentTypeId: "page",
        description: "A regular page",
        name: "Page",
        resourceGroupName: "rg1",
        schema: {
            additionalProperties: false,
            properties: {
                en_us: {
                    additionalProperties: false,
                    properties: {
                        description: {
                            description: "Page description. This property gets included in SEO attributes.",
                            indexed: true,
                            title: "Description",
                            type: "string",
                        },
                        documentId: {
                            description: "Reference to page content document.",
                            title: "Document ID",
                            type: "string",
                        },
                        keywords: {
                            description: "Page keywords. This property gets included in SEO attributes.",
                            indexed: true,
                            title: "Keywords",
                            type: "string",
                        },
                        permalink: {
                            description: "Page permalink, e.g. '/about'.",
                            indexed: true,
                            title: "Permalink",
                            type: "string",
                        },
                        title: {
                            description: "Page title. This property gets included in SEO attributes.",
                            indexed: true,
                            title: "Title",
                            type: "string",
                        },
                    },
                    required: [
                        "title",
                        "permalink",
                        "documentId",
                    ],
                    type: "object",
                },
            },
        },
        serviceName: "apimService1",
        version: "1.0.0",
    });
    
    resources:
      contentType:
        type: azure-native:apimanagement:ContentType
        properties:
          contentTypeId: page
          description: A regular page
          name: Page
          resourceGroupName: rg1
          schema:
            additionalProperties: false
            properties:
              en_us:
                additionalProperties: false
                properties:
                  description:
                    description: Page description. This property gets included in SEO attributes.
                    indexed: true
                    title: Description
                    type: string
                  documentId:
                    description: Reference to page content document.
                    title: Document ID
                    type: string
                  keywords:
                    description: Page keywords. This property gets included in SEO attributes.
                    indexed: true
                    title: Keywords
                    type: string
                  permalink:
                    description: Page permalink, e.g. '/about'.
                    indexed: true
                    title: Permalink
                    type: string
                  title:
                    description: Page title. This property gets included in SEO attributes.
                    indexed: true
                    title: Title
                    type: string
                required:
                  - title
                  - permalink
                  - documentId
                type: object
          serviceName: apimService1
          version: 1.0.0
    

    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,
                    description: Optional[str] = None,
                    id: Optional[str] = None,
                    name: Optional[str] = None,
                    schema: Optional[Any] = None,
                    version: 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.

    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",
        Description = "string",
        Id = "string",
        Name = "string",
        Schema = "any",
        Version = "string",
    });
    
    example, err := apimanagement.NewContentType(ctx, "contentTypeResource", &apimanagement.ContentTypeArgs{
    ResourceGroupName: pulumi.String("string"),
    ServiceName: pulumi.String("string"),
    ContentTypeId: pulumi.String("string"),
    Description: pulumi.String("string"),
    Id: pulumi.String("string"),
    Name: pulumi.String("string"),
    Schema: pulumi.Any("any"),
    Version: pulumi.String("string"),
    })
    
    var contentTypeResource = new ContentType("contentTypeResource", ContentTypeArgs.builder()        
        .resourceGroupName("string")
        .serviceName("string")
        .contentTypeId("string")
        .description("string")
        .id("string")
        .name("string")
        .schema("any")
        .version("string")
        .build());
    
    content_type_resource = azure_native.apimanagement.ContentType("contentTypeResource",
        resource_group_name="string",
        service_name="string",
        content_type_id="string",
        description="string",
        id="string",
        name="string",
        schema="any",
        version="string")
    
    const contentTypeResource = new azure_native.apimanagement.ContentType("contentTypeResource", {
        resourceGroupName: "string",
        serviceName: "string",
        contentTypeId: "string",
        description: "string",
        id: "string",
        name: "string",
        schema: "any",
        version: "string",
    });
    
    type: azure-native:apimanagement:ContentType
    properties:
        contentTypeId: string
        description: string
        id: string
        name: string
        resourceGroupName: string
        schema: any
        serviceName: string
        version: 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

    The ContentType 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.
    ContentTypeId string
    Content type identifier.
    Description string
    Content type description.
    Id string
    Content type identifier
    Name string
    Content type name. Must be 1 to 250 characters long.
    Schema object
    Content type schema.
    Version string
    Content type version.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    ServiceName string
    The name of the API Management service.
    ContentTypeId string
    Content type identifier.
    Description string
    Content type description.
    Id string
    Content type identifier
    Name string
    Content type name. Must be 1 to 250 characters long.
    Schema interface{}
    Content type schema.
    Version string
    Content type version.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    serviceName String
    The name of the API Management service.
    contentTypeId String
    Content type identifier.
    description String
    Content type description.
    id String
    Content type identifier
    name String
    Content type name. Must be 1 to 250 characters long.
    schema Object
    Content type schema.
    version String
    Content type version.
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    serviceName string
    The name of the API Management service.
    contentTypeId string
    Content type identifier.
    description string
    Content type description.
    id string
    Content type identifier
    name string
    Content type name. Must be 1 to 250 characters long.
    schema any
    Content type schema.
    version string
    Content type version.
    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.
    content_type_id str
    Content type identifier.
    description str
    Content type description.
    id str
    Content type identifier
    name str
    Content type name. Must be 1 to 250 characters long.
    schema Any
    Content type schema.
    version str
    Content type version.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    serviceName String
    The name of the API Management service.
    contentTypeId String
    Content type identifier.
    description String
    Content type description.
    id String
    Content type identifier
    name String
    Content type name. Must be 1 to 250 characters long.
    schema Any
    Content type schema.
    version String
    Content type version.

    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.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    Id string
    The provider-assigned unique ID for this managed resource.
    Type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id String
    The provider-assigned unique ID for this managed resource.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id string
    The provider-assigned unique ID for this managed resource.
    type string
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id str
    The provider-assigned unique ID for this managed resource.
    type str
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    id String
    The provider-assigned unique ID for this managed resource.
    type String
    The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

    Import

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

    $ pulumi import azure-native:apimanagement:ContentType page /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId} 
    

    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.37.0 published on Monday, Apr 15, 2024 by Pulumi