GraphQLApiResolverPolicyArgs

data class GraphQLApiResolverPolicyArgs(val apiId: Output<String>? = null, val format: Output<Either<String, PolicyContentFormat>>? = null, val policyId: Output<String>? = null, val resolverId: Output<String>? = null, val resourceGroupName: Output<String>? = null, val serviceName: Output<String>? = null, val value: Output<String>? = null) : ConvertibleToJava<GraphQLApiResolverPolicyArgs>

Policy 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-08-01. Other available API versions: 2022-08-01, 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

ApiManagementCreateGraphQLApiResolverPolicy

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var graphQLApiResolverPolicy = new AzureNative.ApiManagement.GraphQLApiResolverPolicy("graphQLApiResolverPolicy", new()
{
ApiId = "5600b57e7e8880006a040001",
Format = AzureNative.ApiManagement.PolicyContentFormat.Xml,
PolicyId = "policy",
ResolverId = "5600b57e7e8880006a080001",
ResourceGroupName = "rg1",
ServiceName = "apimService1",
Value = "<http-data-source><http-request><set-method>GET</set-method><set-backend-service base-url=\"https://some.service.com\" /><set-url>/api/users</set-url></http-request></http-data-source>",
});
});
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.NewGraphQLApiResolverPolicy(ctx, "graphQLApiResolverPolicy", &apimanagement.GraphQLApiResolverPolicyArgs{
ApiId: pulumi.String("5600b57e7e8880006a040001"),
Format: pulumi.String(apimanagement.PolicyContentFormatXml),
PolicyId: pulumi.String("policy"),
ResolverId: pulumi.String("5600b57e7e8880006a080001"),
ResourceGroupName: pulumi.String("rg1"),
ServiceName: pulumi.String("apimService1"),
Value: pulumi.String("<http-data-source><http-request><set-method>GET</set-method><set-backend-service base-url=\"https://some.service.com\" /><set-url>/api/users</set-url></http-request></http-data-source>"),
})
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.GraphQLApiResolverPolicy;
import com.pulumi.azurenative.apimanagement.GraphQLApiResolverPolicyArgs;
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 graphQLApiResolverPolicy = new GraphQLApiResolverPolicy("graphQLApiResolverPolicy", GraphQLApiResolverPolicyArgs.builder()
.apiId("5600b57e7e8880006a040001")
.format("xml")
.policyId("policy")
.resolverId("5600b57e7e8880006a080001")
.resourceGroupName("rg1")
.serviceName("apimService1")
.value("<http-data-source><http-request><set-method>GET</set-method><set-backend-service base-url=\"https://some.service.com\" /><set-url>/api/users</set-url></http-request></http-data-source>")
.build());
}
}

Import

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

$ pulumi import azure-native:apimanagement:GraphQLApiResolverPolicy policy /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/resolvers/{resolverId}/policies/{policyId}

Constructors

Link copied to clipboard
constructor(apiId: Output<String>? = null, format: Output<Either<String, PolicyContentFormat>>? = null, policyId: Output<String>? = null, resolverId: Output<String>? = null, resourceGroupName: Output<String>? = null, serviceName: Output<String>? = null, value: Output<String>? = null)

Properties

Link copied to clipboard
val apiId: Output<String>? = null

API revision identifier. Must be unique in the current API Management service instance. Non-current revision has ;rev=n as a suffix where n is the revision number.

Link copied to clipboard
val format: Output<Either<String, PolicyContentFormat>>? = null

Format of the policyContent.

Link copied to clipboard
val policyId: Output<String>? = null

The identifier of the Policy.

Link copied to clipboard
val resolverId: Output<String>? = null

Resolver identifier within a GraphQL API. Must be unique in the current API Management service instance.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val serviceName: Output<String>? = null

The name of the API Management service.

Link copied to clipboard
val value: Output<String>? = null

Contents of the Policy as defined by the format.

Functions

Link copied to clipboard
open override fun toJava(): GraphQLApiResolverPolicyArgs