PolicyRestriction

class PolicyRestriction : KotlinCustomResource

Policy restriction contract details. Uses Azure REST API version 2024-06-01-preview. In version 2.x of the Azure Native provider, it used API version 2023-05-01-preview. Other available API versions: 2023-05-01-preview, 2023-09-01-preview, 2024-05-01. 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

ApiManagementCreatePolicyRestriction

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var policyRestriction = new AzureNative.ApiManagement.PolicyRestriction("policyRestriction", new()
{
PolicyRestrictionId = "policyRestriction1",
RequireBase = AzureNative.ApiManagement.PolicyRestrictionRequireBase.@True,
ResourceGroupName = "rg1",
Scope = "Sample Path to the policy document.",
ServiceName = "apimService1",
});
});
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.NewPolicyRestriction(ctx, "policyRestriction", &apimanagement.PolicyRestrictionArgs{
PolicyRestrictionId: pulumi.String("policyRestriction1"),
RequireBase: pulumi.String(apimanagement.PolicyRestrictionRequireBaseTrue),
ResourceGroupName: pulumi.String("rg1"),
Scope: pulumi.String("Sample Path to the policy document."),
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.PolicyRestriction;
import com.pulumi.azurenative.apimanagement.PolicyRestrictionArgs;
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 policyRestriction = new PolicyRestriction("policyRestriction", PolicyRestrictionArgs.builder()
.policyRestrictionId("policyRestriction1")
.requireBase("true")
.resourceGroupName("rg1")
.scope("Sample Path to the policy document.")
.serviceName("apimService1")
.build());
}
}

Import

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

$ pulumi import azure-native:apimanagement:PolicyRestriction policyRestrictions1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}

Properties

Link copied to clipboard
val azureApiVersion: Output<String>

The Azure API version of the resource.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val requireBase: Output<String>?

Indicates if base policy should be enforced for the policy document.

Link copied to clipboard
val scope: Output<String>?

Path to the policy document.

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>