1. Packages
  2. Azure Native v2
  3. API Docs
  4. apimanagement
  5. getPolicyFragment
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

azure-native-v2.apimanagement.getPolicyFragment

Explore with Pulumi AI

These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi

Gets a policy fragment. Azure REST API version: 2022-08-01.

Other available API versions: 2022-09-01-preview, 2023-03-01-preview, 2023-05-01-preview, 2023-09-01-preview, 2024-05-01, 2024-06-01-preview.

Using getPolicyFragment

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getPolicyFragment(args: GetPolicyFragmentArgs, opts?: InvokeOptions): Promise<GetPolicyFragmentResult>
function getPolicyFragmentOutput(args: GetPolicyFragmentOutputArgs, opts?: InvokeOptions): Output<GetPolicyFragmentResult>
Copy
def get_policy_fragment(format: Optional[str] = None,
                        id: Optional[str] = None,
                        resource_group_name: Optional[str] = None,
                        service_name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetPolicyFragmentResult
def get_policy_fragment_output(format: Optional[pulumi.Input[str]] = None,
                        id: Optional[pulumi.Input[str]] = None,
                        resource_group_name: Optional[pulumi.Input[str]] = None,
                        service_name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetPolicyFragmentResult]
Copy
func LookupPolicyFragment(ctx *Context, args *LookupPolicyFragmentArgs, opts ...InvokeOption) (*LookupPolicyFragmentResult, error)
func LookupPolicyFragmentOutput(ctx *Context, args *LookupPolicyFragmentOutputArgs, opts ...InvokeOption) LookupPolicyFragmentResultOutput
Copy

> Note: This function is named LookupPolicyFragment in the Go SDK.

public static class GetPolicyFragment 
{
    public static Task<GetPolicyFragmentResult> InvokeAsync(GetPolicyFragmentArgs args, InvokeOptions? opts = null)
    public static Output<GetPolicyFragmentResult> Invoke(GetPolicyFragmentInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetPolicyFragmentResult> getPolicyFragment(GetPolicyFragmentArgs args, InvokeOptions options)
public static Output<GetPolicyFragmentResult> getPolicyFragment(GetPolicyFragmentArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure-native:apimanagement:getPolicyFragment
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id
This property is required.
Changes to this property will trigger replacement.
string
A resource identifier.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the API Management service.
Format string
Policy fragment content format.
Id
This property is required.
Changes to this property will trigger replacement.
string
A resource identifier.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
ServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the API Management service.
Format string
Policy fragment content format.
id
This property is required.
Changes to this property will trigger replacement.
String
A resource identifier.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the API Management service.
format String
Policy fragment content format.
id
This property is required.
Changes to this property will trigger replacement.
string
A resource identifier.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group. The name is case insensitive.
serviceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the API Management service.
format string
Policy fragment content format.
id
This property is required.
Changes to this property will trigger replacement.
str
A resource identifier.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group. The name is case insensitive.
service_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the API Management service.
format str
Policy fragment content format.
id
This property is required.
Changes to this property will trigger replacement.
String
A resource identifier.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group. The name is case insensitive.
serviceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the API Management service.
format String
Policy fragment content format.

getPolicyFragment Result

The following output properties are available:

Id string
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
Name string
The name of the resource
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Value string
Contents of the policy fragment.
Description string
Policy fragment description.
Format string
Format of the policy fragment content.
Id string
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
Name string
The name of the resource
Type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Value string
Contents of the policy fragment.
Description string
Policy fragment description.
Format string
Format of the policy fragment content.
id String
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
name String
The name of the resource
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
value String
Contents of the policy fragment.
description String
Policy fragment description.
format String
Format of the policy fragment content.
id string
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
name string
The name of the resource
type string
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
value string
Contents of the policy fragment.
description string
Policy fragment description.
format string
Format of the policy fragment content.
id str
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
name str
The name of the resource
type str
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
value str
Contents of the policy fragment.
description str
Policy fragment description.
format str
Format of the policy fragment content.
id String
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
name String
The name of the resource
type String
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
value String
Contents of the policy fragment.
description String
Policy fragment description.
format String
Format of the policy fragment content.

Package Details

Repository
azure-native-v2 pulumi/pulumi-azure-native
License
Apache-2.0
These are the docs for Azure Native v2. We recommenend using the latest version, Azure Native v3.
Azure Native v2 v2.90.0 published on Thursday, Mar 27, 2025 by Pulumi