1. Packages
  2. Azure Native
  3. API Docs
  4. apimanagement
  5. ContentItem
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.73.0 published on Wednesday, Nov 20, 2024 by Pulumi

azure-native.apimanagement.ContentItem

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.73.0 published on Wednesday, Nov 20, 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, 2023-09-01-preview, 2024-05-01.

    Example Usage

    ApiManagementCreateContentTypeContentItem

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var contentItem = new AzureNative.ApiManagement.ContentItem("contentItem", new()
        {
            ContentItemId = "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
            ContentTypeId = "page",
            Properties = new Dictionary<string, object?>
            {
                ["en_us"] = new Dictionary<string, object?>
                {
                    ["description"] = "Short story about the company.",
                    ["documentId"] = "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
                    ["keywords"] = "company, about",
                    ["permalink"] = "/about",
                    ["title"] = "About",
                },
            },
            ResourceGroupName = "rg1",
            ServiceName = "apimService1",
        });
    
    });
    
    package main
    
    import (
    	apimanagement "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.NewContentItem(ctx, "contentItem", &apimanagement.ContentItemArgs{
    			ContentItemId: pulumi.String("4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"),
    			ContentTypeId: pulumi.String("page"),
    			Properties: pulumi.Any(map[string]interface{}{
    				"en_us": map[string]interface{}{
    					"description": "Short story about the company.",
    					"documentId":  "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
    					"keywords":    "company, about",
    					"permalink":   "/about",
    					"title":       "About",
    				},
    			}),
    			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.ContentItem;
    import com.pulumi.azurenative.apimanagement.ContentItemArgs;
    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 contentItem = new ContentItem("contentItem", ContentItemArgs.builder()
                .contentItemId("4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8")
                .contentTypeId("page")
                .properties(Map.of("en_us", Map.ofEntries(
                    Map.entry("description", "Short story about the company."),
                    Map.entry("documentId", "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8"),
                    Map.entry("keywords", "company, about"),
                    Map.entry("permalink", "/about"),
                    Map.entry("title", "About")
                )))
                .resourceGroupName("rg1")
                .serviceName("apimService1")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    content_item = azure_native.apimanagement.ContentItem("contentItem",
        content_item_id="4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
        content_type_id="page",
        properties={
            "en_us": {
                "description": "Short story about the company.",
                "documentId": "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
                "keywords": "company, about",
                "permalink": "/about",
                "title": "About",
            },
        },
        resource_group_name="rg1",
        service_name="apimService1")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const contentItem = new azure_native.apimanagement.ContentItem("contentItem", {
        contentItemId: "4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
        contentTypeId: "page",
        properties: {
            en_us: {
                description: "Short story about the company.",
                documentId: "contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8",
                keywords: "company, about",
                permalink: "/about",
                title: "About",
            },
        },
        resourceGroupName: "rg1",
        serviceName: "apimService1",
    });
    
    resources:
      contentItem:
        type: azure-native:apimanagement:ContentItem
        properties:
          contentItemId: 4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8
          contentTypeId: page
          properties:
            en_us:
              description: Short story about the company.
              documentId: contentTypes/document/contentItems/4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8
              keywords: company, about
              permalink: /about
              title: About
          resourceGroupName: rg1
          serviceName: apimService1
    

    Create ContentItem Resource

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

    Constructor syntax

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

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

    ContentTypeId string
    Content type identifier.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    ServiceName string
    The name of the API Management service.
    ContentItemId string
    Content item identifier.
    Properties object
    Properties of the content item.
    ContentTypeId string
    Content type identifier.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    ServiceName string
    The name of the API Management service.
    ContentItemId string
    Content item identifier.
    Properties interface{}
    Properties of the content item.
    contentTypeId String
    Content type identifier.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    serviceName String
    The name of the API Management service.
    contentItemId String
    Content item identifier.
    properties Object
    Properties of the content item.
    contentTypeId string
    Content type identifier.
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    serviceName string
    The name of the API Management service.
    contentItemId string
    Content item identifier.
    properties any
    Properties of the content item.
    content_type_id str
    Content type identifier.
    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_item_id str
    Content item identifier.
    properties Any
    Properties of the content item.
    contentTypeId String
    Content type identifier.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    serviceName String
    The name of the API Management service.
    contentItemId String
    Content item identifier.
    properties Any
    Properties of the content item.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The name of the 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.
    Name string
    The name of the 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.
    name String
    The name of the 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.
    name string
    The name of the 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.
    name str
    The name of the 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.
    name String
    The name of the 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:ContentItem 4e3cf6a5-574a-ba08-1f23-2e7a38faa6d8 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/contentTypes/{contentTypeId}/contentItems/{contentItemId} 
    

    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.73.0 published on Wednesday, Nov 20, 2024 by Pulumi