azure-native-v2.apimanagement.Schema
Explore with Pulumi AI
Schema Contract details. Azure REST API version: 2021-04-01-preview. Prior API version in Azure Native 1.x: 2021-04-01-preview.
Example Usage
ApiManagementCreateSchema1
ApiManagementCreateSchema2
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var schema = new AzureNative.ApiManagement.Schema("schema", new()
{
Description = "sample schema description",
ResourceGroupName = "rg1",
SchemaId = "schema1",
SchemaType = AzureNative.ApiManagement.SchemaType.Json,
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.NewSchema(ctx, "schema", &apimanagement.SchemaArgs{
Description: pulumi.String("sample schema description"),
ResourceGroupName: pulumi.String("rg1"),
SchemaId: pulumi.String("schema1"),
SchemaType: pulumi.String(apimanagement.SchemaTypeJson),
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.Schema;
import com.pulumi.azurenative.apimanagement.SchemaArgs;
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 schema = new Schema("schema", SchemaArgs.builder()
.description("sample schema description")
.resourceGroupName("rg1")
.schemaId("schema1")
.schemaType("json")
.serviceName("apimService1")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const schema = new azure_native.apimanagement.Schema("schema", {
description: "sample schema description",
resourceGroupName: "rg1",
schemaId: "schema1",
schemaType: azure_native.apimanagement.SchemaType.Json,
serviceName: "apimService1",
});
import pulumi
import pulumi_azure_native as azure_native
schema = azure_native.apimanagement.Schema("schema",
description="sample schema description",
resource_group_name="rg1",
schema_id="schema1",
schema_type=azure_native.apimanagement.SchemaType.JSON,
service_name="apimService1")
resources:
schema:
type: azure-native:apimanagement:Schema
properties:
description: sample schema description
resourceGroupName: rg1
schemaId: schema1
schemaType: json
serviceName: apimService1
Create Schema Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Schema(name: string, args: SchemaArgs, opts?: CustomResourceOptions);
@overload
def Schema(resource_name: str,
args: SchemaArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Schema(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
schema_type: Optional[Union[str, SchemaType]] = None,
service_name: Optional[str] = None,
description: Optional[str] = None,
schema_id: Optional[str] = None,
value: Optional[str] = None)
func NewSchema(ctx *Context, name string, args SchemaArgs, opts ...ResourceOption) (*Schema, error)
public Schema(string name, SchemaArgs args, CustomResourceOptions? opts = null)
public Schema(String name, SchemaArgs args)
public Schema(String name, SchemaArgs args, CustomResourceOptions options)
type: azure-native:apimanagement:Schema
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. SchemaArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. SchemaArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. SchemaArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. SchemaArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. SchemaArgs - 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 schemaResource = new AzureNative.Apimanagement.Schema("schemaResource", new()
{
ResourceGroupName = "string",
SchemaType = "string",
ServiceName = "string",
Description = "string",
SchemaId = "string",
Value = "string",
});
example, err := apimanagement.NewSchema(ctx, "schemaResource", &apimanagement.SchemaArgs{
ResourceGroupName: "string",
SchemaType: "string",
ServiceName: "string",
Description: "string",
SchemaId: "string",
Value: "string",
})
var schemaResource = new com.pulumi.azurenative.apimanagement.Schema("schemaResource", com.pulumi.azurenative.apimanagement.SchemaArgs.builder()
.resourceGroupName("string")
.schemaType("string")
.serviceName("string")
.description("string")
.schemaId("string")
.value("string")
.build());
schema_resource = azure_native.apimanagement.Schema("schemaResource",
resource_group_name=string,
schema_type=string,
service_name=string,
description=string,
schema_id=string,
value=string)
const schemaResource = new azure_native.apimanagement.Schema("schemaResource", {
resourceGroupName: "string",
schemaType: "string",
serviceName: "string",
description: "string",
schemaId: "string",
value: "string",
});
type: azure-native:apimanagement:Schema
properties:
description: string
resourceGroupName: string
schemaId: string
schemaType: string
serviceName: string
value: string
Schema 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 Schema resource accepts the following input properties:
- Resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- Schema
Type This property is required. string | Pulumi.Azure Native. Api Management. Schema Type - Schema Type. Immutable.
- Service
Name This property is required. Changes to this property will trigger replacement.
- The name of the API Management service.
- Description string
- Free-form schema entity description.
- Schema
Id Changes to this property will trigger replacement.
- Schema id identifier. Must be unique in the current API Management service instance.
- Value string
- Json-encoded string for non json-based schema.
- Resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- Schema
Type This property is required. string | SchemaType - Schema Type. Immutable.
- Service
Name This property is required. Changes to this property will trigger replacement.
- The name of the API Management service.
- Description string
- Free-form schema entity description.
- Schema
Id Changes to this property will trigger replacement.
- Schema id identifier. Must be unique in the current API Management service instance.
- Value string
- Json-encoded string for non json-based schema.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- schema
Type This property is required. String | SchemaType - Schema Type. Immutable.
- service
Name This property is required. Changes to this property will trigger replacement.
- The name of the API Management service.
- description String
- Free-form schema entity description.
- schema
Id Changes to this property will trigger replacement.
- Schema id identifier. Must be unique in the current API Management service instance.
- value String
- Json-encoded string for non json-based schema.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- schema
Type This property is required. string | SchemaType - Schema Type. Immutable.
- service
Name This property is required. Changes to this property will trigger replacement.
- The name of the API Management service.
- description string
- Free-form schema entity description.
- schema
Id Changes to this property will trigger replacement.
- Schema id identifier. Must be unique in the current API Management service instance.
- value string
- Json-encoded string for non json-based schema.
- resource_
group_ name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- schema_
type This property is required. str | SchemaType - Schema Type. Immutable.
- service_
name This property is required. Changes to this property will trigger replacement.
- The name of the API Management service.
- description str
- Free-form schema entity description.
- schema_
id Changes to this property will trigger replacement.
- Schema id identifier. Must be unique in the current API Management service instance.
- value str
- Json-encoded string for non json-based schema.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group.
- schema
Type This property is required. String | "xml" | "json" - Schema Type. Immutable.
- service
Name This property is required. Changes to this property will trigger replacement.
- The name of the API Management service.
- description String
- Free-form schema entity description.
- schema
Id Changes to this property will trigger replacement.
- Schema id identifier. Must be unique in the current API Management service instance.
- value String
- Json-encoded string for non json-based schema.
Outputs
All input properties are implicitly available as output properties. Additionally, the Schema resource produces the following output properties:
Supporting Types
SchemaType, SchemaTypeArgs
- Xml
- xmlXML schema type.
- Json
- jsonJson schema type.
- Schema
Type Xml - xmlXML schema type.
- Schema
Type Json - jsonJson schema type.
- Xml
- xmlXML schema type.
- Json
- jsonJson schema type.
- Xml
- xmlXML schema type.
- Json
- jsonJson schema type.
- XML
- xmlXML schema type.
- JSON
- jsonJson schema type.
- "xml"
- xmlXML schema type.
- "json"
- jsonJson schema type.
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:apimanagement:Schema schema1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- azure-native-v2 pulumi/pulumi-azure-native
- License
- Apache-2.0