Workspace Api Schema Args
API Schema Contract details. Uses Azure REST API version 2022-09-01-preview. In version 2.x of the Azure Native provider, it used API version 2022-09-01-preview. Other available API versions: 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01, 2024-06-01-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native apimanagement [ApiVersion]
. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.
Example Usage
ApiManagementCreateWorkspaceApiSchema
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var workspaceApiSchema = new AzureNative.ApiManagement.WorkspaceApiSchema("workspaceApiSchema", new()
{
ApiId = "59d6bb8f1f7fab13dc67ec9b",
ContentType = "application/vnd.ms-azure-apim.xsd+xml",
ResourceGroupName = "rg1",
SchemaId = "ec12520d-9d48-4e7b-8f39-698ca2ac63f1",
ServiceName = "apimService1",
Value = @"<s:schema elementFormDefault=""qualified"" targetNamespace=""http://ws.cdyne.com/WeatherWS/"" xmlns:tns=""http://ws.cdyne.com/WeatherWS/"" xmlns:s=""http://www.w3.org/2001/XMLSchema"" xmlns:soap12=""http://schemas.xmlsoap.org/wsdl/soap12/"" xmlns:mime=""http://schemas.xmlsoap.org/wsdl/mime/"" xmlns:soap=""http://schemas.xmlsoap.org/wsdl/soap/"" xmlns:tm=""http://microsoft.com/wsdl/mime/textMatching/"" xmlns:http=""http://schemas.xmlsoap.org/wsdl/http/"" xmlns:soapenc=""http://schemas.xmlsoap.org/soap/encoding/"" xmlns:wsdl=""http://schemas.xmlsoap.org/wsdl/"" xmlns:apim-wsdltns=""http://ws.cdyne.com/WeatherWS/"">
<s:element name=""GetWeatherInformation"">
<s:complexType />
</s:element>
<s:element name=""GetWeatherInformationResponse"">
<s:complexType>
<s:sequence>
<s:element minOccurs=""0"" maxOccurs=""1"" name=""GetWeatherInformationResult"" type=""tns:ArrayOfWeatherDescription"" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name=""ArrayOfWeatherDescription"">
<s:sequence>
<s:element minOccurs=""0"" maxOccurs=""unbounded"" name=""WeatherDescription"" type=""tns:WeatherDescription"" />
</s:sequence>
</s:complexType>
<s:complexType name=""WeatherDescription"">
<s:sequence>
<s:element minOccurs=""1"" maxOccurs=""1"" name=""WeatherID"" type=""s:short"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""Description"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""PictureURL"" type=""s:string"" />
</s:sequence>
</s:complexType>
<s:element name=""GetCityForecastByZIP"">
<s:complexType>
<s:sequence>
<s:element minOccurs=""0"" maxOccurs=""1"" name=""ZIP"" type=""s:string"" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name=""GetCityForecastByZIPResponse"">
<s:complexType>
<s:sequence>
<s:element minOccurs=""0"" maxOccurs=""1"" name=""GetCityForecastByZIPResult"" type=""tns:ForecastReturn"" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name=""ForecastReturn"">
<s:sequence>
<s:element minOccurs=""1"" maxOccurs=""1"" name=""Success"" type=""s:boolean"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""ResponseText"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""State"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""City"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""WeatherStationCity"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""ForecastResult"" type=""tns:ArrayOfForecast"" />
</s:sequence>
</s:complexType>
<s:complexType name=""ArrayOfForecast"">
<s:sequence>
<s:element minOccurs=""0"" maxOccurs=""unbounded"" name=""Forecast"" nillable=""true"" type=""tns:Forecast"" />
</s:sequence>
</s:complexType>
<s:complexType name=""Forecast"">
<s:sequence>
<s:element minOccurs=""1"" maxOccurs=""1"" name=""Date"" type=""s:dateTime"" />
<s:element minOccurs=""1"" maxOccurs=""1"" name=""WeatherID"" type=""s:short"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""Desciption"" type=""s:string"" />
<s:element minOccurs=""1"" maxOccurs=""1"" name=""Temperatures"" type=""tns:temp"" />
<s:element minOccurs=""1"" maxOccurs=""1"" name=""ProbabilityOfPrecipiation"" type=""tns:POP"" />
</s:sequence>
</s:complexType>
<s:complexType name=""temp"">
<s:sequence>
<s:element minOccurs=""0"" maxOccurs=""1"" name=""MorningLow"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""DaytimeHigh"" type=""s:string"" />
</s:sequence>
</s:complexType>
<s:complexType name=""POP"">
<s:sequence>
<s:element minOccurs=""0"" maxOccurs=""1"" name=""Nighttime"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""Daytime"" type=""s:string"" />
</s:sequence>
</s:complexType>
<s:element name=""GetCityWeatherByZIP"">
<s:complexType>
<s:sequence>
<s:element minOccurs=""0"" maxOccurs=""1"" name=""ZIP"" type=""s:string"" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name=""GetCityWeatherByZIPResponse"">
<s:complexType>
<s:sequence>
<s:element minOccurs=""1"" maxOccurs=""1"" name=""GetCityWeatherByZIPResult"" type=""tns:WeatherReturn"" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name=""WeatherReturn"">
<s:sequence>
<s:element minOccurs=""1"" maxOccurs=""1"" name=""Success"" type=""s:boolean"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""ResponseText"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""State"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""City"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""WeatherStationCity"" type=""s:string"" />
<s:element minOccurs=""1"" maxOccurs=""1"" name=""WeatherID"" type=""s:short"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""Description"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""Temperature"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""RelativeHumidity"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""Wind"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""Pressure"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""Visibility"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""WindChill"" type=""s:string"" />
<s:element minOccurs=""0"" maxOccurs=""1"" name=""Remarks"" type=""s:string"" />
</s:sequence>
</s:complexType>
<s:element name=""ArrayOfWeatherDescription"" nillable=""true"" type=""tns:ArrayOfWeatherDescription"" />
<s:element name=""ForecastReturn"" nillable=""true"" type=""tns:ForecastReturn"" />
<s:element name=""WeatherReturn"" type=""tns:WeatherReturn"" />
</s:schema>",
WorkspaceId = "wks1",
});
});
package main
import (
apimanagement "github.com/pulumi/pulumi-azure-native-sdk/apimanagement/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apimanagement.NewWorkspaceApiSchema(ctx, "workspaceApiSchema", &apimanagement.WorkspaceApiSchemaArgs{
ApiId: pulumi.String("59d6bb8f1f7fab13dc67ec9b"),
ContentType: pulumi.String("application/vnd.ms-azure-apim.xsd+xml"),
ResourceGroupName: pulumi.String("rg1"),
SchemaId: pulumi.String("ec12520d-9d48-4e7b-8f39-698ca2ac63f1"),
ServiceName: pulumi.String("apimService1"),
Value: pulumi.String(`<s:schema elementFormDefault="qualified" targetNamespace="http://ws.cdyne.com/WeatherWS/" xmlns:tns="http://ws.cdyne.com/WeatherWS/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:apim-wsdltns="http://ws.cdyne.com/WeatherWS/">
<s:element name="GetWeatherInformation">
<s:complexType />
</s:element>
<s:element name="GetWeatherInformationResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetWeatherInformationResult" type="tns:ArrayOfWeatherDescription" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ArrayOfWeatherDescription">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="WeatherDescription" type="tns:WeatherDescription" />
</s:sequence>
</s:complexType>
<s:complexType name="WeatherDescription">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="WeatherID" type="s:short" />
<s:element minOccurs="0" maxOccurs="1" name="Description" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="PictureURL" type="s:string" />
</s:sequence>
</s:complexType>
<s:element name="GetCityForecastByZIP">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ZIP" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetCityForecastByZIPResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetCityForecastByZIPResult" type="tns:ForecastReturn" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ForecastReturn">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="Success" type="s:boolean" />
<s:element minOccurs="0" maxOccurs="1" name="ResponseText" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="State" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="City" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="WeatherStationCity" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="ForecastResult" type="tns:ArrayOfForecast" />
</s:sequence>
</s:complexType>
<s:complexType name="ArrayOfForecast">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="Forecast" nillable="true" type="tns:Forecast" />
</s:sequence>
</s:complexType>
<s:complexType name="Forecast">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="Date" type="s:dateTime" />
<s:element minOccurs="1" maxOccurs="1" name="WeatherID" type="s:short" />
<s:element minOccurs="0" maxOccurs="1" name="Desciption" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="Temperatures" type="tns:temp" />
<s:element minOccurs="1" maxOccurs="1" name="ProbabilityOfPrecipiation" type="tns:POP" />
</s:sequence>
</s:complexType>
<s:complexType name="temp">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="MorningLow" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="DaytimeHigh" type="s:string" />
</s:sequence>
</s:complexType>
<s:complexType name="POP">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Nighttime" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Daytime" type="s:string" />
</s:sequence>
</s:complexType>
<s:element name="GetCityWeatherByZIP">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ZIP" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetCityWeatherByZIPResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="GetCityWeatherByZIPResult" type="tns:WeatherReturn" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="WeatherReturn">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="Success" type="s:boolean" />
<s:element minOccurs="0" maxOccurs="1" name="ResponseText" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="State" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="City" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="WeatherStationCity" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="WeatherID" type="s:short" />
<s:element minOccurs="0" maxOccurs="1" name="Description" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Temperature" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="RelativeHumidity" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Wind" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Pressure" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Visibility" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="WindChill" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Remarks" type="s:string" />
</s:sequence>
</s:complexType>
<s:element name="ArrayOfWeatherDescription" nillable="true" type="tns:ArrayOfWeatherDescription" />
<s:element name="ForecastReturn" nillable="true" type="tns:ForecastReturn" />
<s:element name="WeatherReturn" type="tns:WeatherReturn" />
</s:schema>`),
WorkspaceId: pulumi.String("wks1"),
})
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.WorkspaceApiSchema;
import com.pulumi.azurenative.apimanagement.WorkspaceApiSchemaArgs;
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 workspaceApiSchema = new WorkspaceApiSchema("workspaceApiSchema", WorkspaceApiSchemaArgs.builder()
.apiId("59d6bb8f1f7fab13dc67ec9b")
.contentType("application/vnd.ms-azure-apim.xsd+xml")
.resourceGroupName("rg1")
.schemaId("ec12520d-9d48-4e7b-8f39-698ca2ac63f1")
.serviceName("apimService1")
.value("""
<s:schema elementFormDefault="qualified" targetNamespace="http://ws.cdyne.com/WeatherWS/" xmlns:tns="http://ws.cdyne.com/WeatherWS/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:apim-wsdltns="http://ws.cdyne.com/WeatherWS/">
<s:element name="GetWeatherInformation">
<s:complexType />
</s:element>
<s:element name="GetWeatherInformationResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetWeatherInformationResult" type="tns:ArrayOfWeatherDescription" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ArrayOfWeatherDescription">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="WeatherDescription" type="tns:WeatherDescription" />
</s:sequence>
</s:complexType>
<s:complexType name="WeatherDescription">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="WeatherID" type="s:short" />
<s:element minOccurs="0" maxOccurs="1" name="Description" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="PictureURL" type="s:string" />
</s:sequence>
</s:complexType>
<s:element name="GetCityForecastByZIP">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ZIP" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetCityForecastByZIPResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetCityForecastByZIPResult" type="tns:ForecastReturn" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ForecastReturn">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="Success" type="s:boolean" />
<s:element minOccurs="0" maxOccurs="1" name="ResponseText" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="State" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="City" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="WeatherStationCity" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="ForecastResult" type="tns:ArrayOfForecast" />
</s:sequence>
</s:complexType>
<s:complexType name="ArrayOfForecast">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="Forecast" nillable="true" type="tns:Forecast" />
</s:sequence>
</s:complexType>
<s:complexType name="Forecast">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="Date" type="s:dateTime" />
<s:element minOccurs="1" maxOccurs="1" name="WeatherID" type="s:short" />
<s:element minOccurs="0" maxOccurs="1" name="Desciption" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="Temperatures" type="tns:temp" />
<s:element minOccurs="1" maxOccurs="1" name="ProbabilityOfPrecipiation" type="tns:POP" />
</s:sequence>
</s:complexType>
<s:complexType name="temp">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="MorningLow" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="DaytimeHigh" type="s:string" />
</s:sequence>
</s:complexType>
<s:complexType name="POP">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Nighttime" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Daytime" type="s:string" />
</s:sequence>
</s:complexType>
<s:element name="GetCityWeatherByZIP">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ZIP" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetCityWeatherByZIPResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="GetCityWeatherByZIPResult" type="tns:WeatherReturn" />
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="WeatherReturn">
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="Success" type="s:boolean" />
<s:element minOccurs="0" maxOccurs="1" name="ResponseText" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="State" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="City" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="WeatherStationCity" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="WeatherID" type="s:short" />
<s:element minOccurs="0" maxOccurs="1" name="Description" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Temperature" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="RelativeHumidity" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Wind" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Pressure" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Visibility" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="WindChill" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Remarks" type="s:string" />
</s:sequence>
</s:complexType>
<s:element name="ArrayOfWeatherDescription" nillable="true" type="tns:ArrayOfWeatherDescription" />
<s:element name="ForecastReturn" nillable="true" type="tns:ForecastReturn" />
<s:element name="WeatherReturn" type="tns:WeatherReturn" />
</s:schema> """)
.workspaceId("wks1")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:apimanagement:WorkspaceApiSchema ec12520d-9d48-4e7b-8f39-698ca2ac63f1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/schemas/{schemaId}
Constructors
Properties
Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise.
Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). - Swagger
Schema use application/vnd.ms-azure-apim.swagger.definitions+json
- WSDL
Schema use application/vnd.ms-azure-apim.xsd+xml
- OpenApi
Schema use application/vnd.oai.openapi.components+json
- WADL Schema
use application/vnd.ms-azure-apim.wadl.grammars+xml
.
Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise.
The name of the resource group. The name is case insensitive.
The name of the API Management service.
Workspace identifier. Must be unique in the current API Management service instance.