1. Packages
  2. Azure Native
  3. API Docs
  4. peering
  5. Prefix
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

azure-native.peering.Prefix

Explore with Pulumi AI

This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi

The peering service prefix class.

Uses Azure REST API version 2022-10-01. In version 2.x of the Azure Native provider, it used API version 2022-10-01.

Example Usage

Create or update a prefix for the peering service

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;

return await Deployment.RunAsync(() => 
{
    var prefix = new AzureNative.Peering.Prefix("prefix", new()
    {
        PeeringServiceName = "peeringServiceName",
        PeeringServicePrefixKey = "00000000-0000-0000-0000-000000000000",
        Prefix = "192.168.1.0/24",
        PrefixName = "peeringServicePrefixName",
        ResourceGroupName = "rgName",
    });

});
Copy
package main

import (
	peering "github.com/pulumi/pulumi-azure-native-sdk/peering/v3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := peering.NewPrefix(ctx, "prefix", &peering.PrefixArgs{
			PeeringServiceName:      pulumi.String("peeringServiceName"),
			PeeringServicePrefixKey: pulumi.String("00000000-0000-0000-0000-000000000000"),
			Prefix:                  pulumi.String("192.168.1.0/24"),
			PrefixName:              pulumi.String("peeringServicePrefixName"),
			ResourceGroupName:       pulumi.String("rgName"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.peering.Prefix;
import com.pulumi.azurenative.peering.PrefixArgs;
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 prefix = new Prefix("prefix", PrefixArgs.builder()
            .peeringServiceName("peeringServiceName")
            .peeringServicePrefixKey("00000000-0000-0000-0000-000000000000")
            .prefix("192.168.1.0/24")
            .prefixName("peeringServicePrefixName")
            .resourceGroupName("rgName")
            .build());

    }
}
Copy
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";

const prefix = new azure_native.peering.Prefix("prefix", {
    peeringServiceName: "peeringServiceName",
    peeringServicePrefixKey: "00000000-0000-0000-0000-000000000000",
    prefix: "192.168.1.0/24",
    prefixName: "peeringServicePrefixName",
    resourceGroupName: "rgName",
});
Copy
import pulumi
import pulumi_azure_native as azure_native

prefix = azure_native.peering.Prefix("prefix",
    peering_service_name="peeringServiceName",
    peering_service_prefix_key="00000000-0000-0000-0000-000000000000",
    prefix="192.168.1.0/24",
    prefix_name="peeringServicePrefixName",
    resource_group_name="rgName")
Copy
resources:
  prefix:
    type: azure-native:peering:Prefix
    properties:
      peeringServiceName: peeringServiceName
      peeringServicePrefixKey: 00000000-0000-0000-0000-000000000000
      prefix: 192.168.1.0/24
      prefixName: peeringServicePrefixName
      resourceGroupName: rgName
Copy

Create Prefix Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Prefix(name: string, args: PrefixArgs, opts?: CustomResourceOptions);
@overload
def Prefix(resource_name: str,
           args: PrefixArgs,
           opts: Optional[ResourceOptions] = None)

@overload
def Prefix(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           peering_service_name: Optional[str] = None,
           resource_group_name: Optional[str] = None,
           peering_service_prefix_key: Optional[str] = None,
           prefix: Optional[str] = None,
           prefix_name: Optional[str] = None)
func NewPrefix(ctx *Context, name string, args PrefixArgs, opts ...ResourceOption) (*Prefix, error)
public Prefix(string name, PrefixArgs args, CustomResourceOptions? opts = null)
public Prefix(String name, PrefixArgs args)
public Prefix(String name, PrefixArgs args, CustomResourceOptions options)
type: azure-native:peering:Prefix
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. PrefixArgs
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. PrefixArgs
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. PrefixArgs
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. PrefixArgs
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. PrefixArgs
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 prefixResource = new AzureNative.Peering.Prefix("prefixResource", new()
{
    PeeringServiceName = "string",
    ResourceGroupName = "string",
    PeeringServicePrefixKey = "string",
    Prefix = "string",
    PrefixName = "string",
});
Copy
example, err := peering.NewPrefix(ctx, "prefixResource", &peering.PrefixArgs{
	PeeringServiceName:      pulumi.String("string"),
	ResourceGroupName:       pulumi.String("string"),
	PeeringServicePrefixKey: pulumi.String("string"),
	Prefix:                  pulumi.String("string"),
	PrefixName:              pulumi.String("string"),
})
Copy
var prefixResource = new Prefix("prefixResource", PrefixArgs.builder()
    .peeringServiceName("string")
    .resourceGroupName("string")
    .peeringServicePrefixKey("string")
    .prefix("string")
    .prefixName("string")
    .build());
Copy
prefix_resource = azure_native.peering.Prefix("prefixResource",
    peering_service_name="string",
    resource_group_name="string",
    peering_service_prefix_key="string",
    prefix="string",
    prefix_name="string")
Copy
const prefixResource = new azure_native.peering.Prefix("prefixResource", {
    peeringServiceName: "string",
    resourceGroupName: "string",
    peeringServicePrefixKey: "string",
    prefix: "string",
    prefixName: "string",
});
Copy
type: azure-native:peering:Prefix
properties:
    peeringServiceName: string
    peeringServicePrefixKey: string
    prefix: string
    prefixName: string
    resourceGroupName: string
Copy

Prefix 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 Prefix resource accepts the following input properties:

PeeringServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the peering service.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
PeeringServicePrefixKey string
The peering service prefix key
Prefix string
The prefix from which your traffic originates.
PrefixName Changes to this property will trigger replacement. string
The name of the prefix.
PeeringServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the peering service.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
PeeringServicePrefixKey string
The peering service prefix key
Prefix string
The prefix from which your traffic originates.
PrefixName Changes to this property will trigger replacement. string
The name of the prefix.
peeringServiceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the peering service.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
peeringServicePrefixKey String
The peering service prefix key
prefix String
The prefix from which your traffic originates.
prefixName Changes to this property will trigger replacement. String
The name of the prefix.
peeringServiceName
This property is required.
Changes to this property will trigger replacement.
string
The name of the peering service.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group.
peeringServicePrefixKey string
The peering service prefix key
prefix string
The prefix from which your traffic originates.
prefixName Changes to this property will trigger replacement. string
The name of the prefix.
peering_service_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the peering service.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group.
peering_service_prefix_key str
The peering service prefix key
prefix str
The prefix from which your traffic originates.
prefix_name Changes to this property will trigger replacement. str
The name of the prefix.
peeringServiceName
This property is required.
Changes to this property will trigger replacement.
String
The name of the peering service.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group.
peeringServicePrefixKey String
The peering service prefix key
prefix String
The prefix from which your traffic originates.
prefixName Changes to this property will trigger replacement. String
The name of the prefix.

Outputs

All input properties are implicitly available as output properties. Additionally, the Prefix resource produces the following output properties:

AzureApiVersion string
The Azure API version of the resource.
ErrorMessage string
The error message for validation state
Events List<Pulumi.AzureNative.Peering.Outputs.PeeringServicePrefixEventResponse>
The list of events for peering service prefix
Id string
The provider-assigned unique ID for this managed resource.
LearnedType string
The prefix learned type
Name string
The name of the resource.
PrefixValidationState string
The prefix validation state
ProvisioningState string
The provisioning state of the resource.
Type string
The type of the resource.
AzureApiVersion string
The Azure API version of the resource.
ErrorMessage string
The error message for validation state
Events []PeeringServicePrefixEventResponse
The list of events for peering service prefix
Id string
The provider-assigned unique ID for this managed resource.
LearnedType string
The prefix learned type
Name string
The name of the resource.
PrefixValidationState string
The prefix validation state
ProvisioningState string
The provisioning state of the resource.
Type string
The type of the resource.
azureApiVersion String
The Azure API version of the resource.
errorMessage String
The error message for validation state
events List<PeeringServicePrefixEventResponse>
The list of events for peering service prefix
id String
The provider-assigned unique ID for this managed resource.
learnedType String
The prefix learned type
name String
The name of the resource.
prefixValidationState String
The prefix validation state
provisioningState String
The provisioning state of the resource.
type String
The type of the resource.
azureApiVersion string
The Azure API version of the resource.
errorMessage string
The error message for validation state
events PeeringServicePrefixEventResponse[]
The list of events for peering service prefix
id string
The provider-assigned unique ID for this managed resource.
learnedType string
The prefix learned type
name string
The name of the resource.
prefixValidationState string
The prefix validation state
provisioningState string
The provisioning state of the resource.
type string
The type of the resource.
azure_api_version str
The Azure API version of the resource.
error_message str
The error message for validation state
events Sequence[PeeringServicePrefixEventResponse]
The list of events for peering service prefix
id str
The provider-assigned unique ID for this managed resource.
learned_type str
The prefix learned type
name str
The name of the resource.
prefix_validation_state str
The prefix validation state
provisioning_state str
The provisioning state of the resource.
type str
The type of the resource.
azureApiVersion String
The Azure API version of the resource.
errorMessage String
The error message for validation state
events List<Property Map>
The list of events for peering service prefix
id String
The provider-assigned unique ID for this managed resource.
learnedType String
The prefix learned type
name String
The name of the resource.
prefixValidationState String
The prefix validation state
provisioningState String
The provisioning state of the resource.
type String
The type of the resource.

Supporting Types

PeeringServicePrefixEventResponse
, PeeringServicePrefixEventResponseArgs

EventDescription This property is required. string
The description of the event associated with a prefix.
EventLevel This property is required. string
The level of the event associated with a prefix.
EventSummary This property is required. string
The summary of the event associated with a prefix.
EventTimestamp This property is required. string
The timestamp of the event associated with a prefix.
EventType This property is required. string
The type of the event associated with a prefix.
EventDescription This property is required. string
The description of the event associated with a prefix.
EventLevel This property is required. string
The level of the event associated with a prefix.
EventSummary This property is required. string
The summary of the event associated with a prefix.
EventTimestamp This property is required. string
The timestamp of the event associated with a prefix.
EventType This property is required. string
The type of the event associated with a prefix.
eventDescription This property is required. String
The description of the event associated with a prefix.
eventLevel This property is required. String
The level of the event associated with a prefix.
eventSummary This property is required. String
The summary of the event associated with a prefix.
eventTimestamp This property is required. String
The timestamp of the event associated with a prefix.
eventType This property is required. String
The type of the event associated with a prefix.
eventDescription This property is required. string
The description of the event associated with a prefix.
eventLevel This property is required. string
The level of the event associated with a prefix.
eventSummary This property is required. string
The summary of the event associated with a prefix.
eventTimestamp This property is required. string
The timestamp of the event associated with a prefix.
eventType This property is required. string
The type of the event associated with a prefix.
event_description This property is required. str
The description of the event associated with a prefix.
event_level This property is required. str
The level of the event associated with a prefix.
event_summary This property is required. str
The summary of the event associated with a prefix.
event_timestamp This property is required. str
The timestamp of the event associated with a prefix.
event_type This property is required. str
The type of the event associated with a prefix.
eventDescription This property is required. String
The description of the event associated with a prefix.
eventLevel This property is required. String
The level of the event associated with a prefix.
eventSummary This property is required. String
The summary of the event associated with a prefix.
eventTimestamp This property is required. String
The timestamp of the event associated with a prefix.
eventType This property is required. String
The type of the event associated with a prefix.

Import

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

$ pulumi import azure-native:peering:Prefix peeringServicePrefixName /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Peering/peeringServices/{peeringServiceName}/prefixes/{prefixName} 
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Native pulumi/pulumi-azure-native
License
Apache-2.0
This is the latest version of Azure Native. Use the Azure Native v2 docs if using the v2 version of this package.
Azure Native v3.1.0 published on Tuesday, Apr 8, 2025 by Pulumi