azure-native.peering.Prefix
Explore with Pulumi AI
The peering service prefix class. Azure REST API version: 2022-10-01. Prior API version in Azure Native 1.x: 2021-01-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",
});
});
package main
import (
peering "github.com/pulumi/pulumi-azure-native-sdk/peering/v2"
"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
})
}
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());
}
}
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")
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",
});
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
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 string
- The unique name of the resource.
- args PrefixArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args PrefixArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PrefixArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
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"),
})
var prefixResource = new Prefix("prefixResource", PrefixArgs.builder()
.peeringServiceName("string")
.resourceGroupName("string")
.peeringServicePrefixKey("string")
.prefix("string")
.prefixName("string")
.build());
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")
const prefixResource = new azure_native.peering.Prefix("prefixResource", {
peeringServiceName: "string",
resourceGroupName: "string",
peeringServicePrefixKey: "string",
prefix: "string",
prefixName: "string",
});
type: azure-native:peering:Prefix
properties:
peeringServiceName: string
peeringServicePrefixKey: string
prefix: string
prefixName: string
resourceGroupName: string
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:
- Peering
Service stringName - The name of the peering service.
- Resource
Group stringName - The name of the resource group.
- Peering
Service stringPrefix Key - The peering service prefix key
- Prefix string
- The prefix from which your traffic originates.
- Prefix
Name string - The name of the prefix.
- Peering
Service stringName - The name of the peering service.
- Resource
Group stringName - The name of the resource group.
- Peering
Service stringPrefix Key - The peering service prefix key
- Prefix string
- The prefix from which your traffic originates.
- Prefix
Name string - The name of the prefix.
- peering
Service StringName - The name of the peering service.
- resource
Group StringName - The name of the resource group.
- peering
Service StringPrefix Key - The peering service prefix key
- prefix String
- The prefix from which your traffic originates.
- prefix
Name String - The name of the prefix.
- peering
Service stringName - The name of the peering service.
- resource
Group stringName - The name of the resource group.
- peering
Service stringPrefix Key - The peering service prefix key
- prefix string
- The prefix from which your traffic originates.
- prefix
Name string - The name of the prefix.
- peering_
service_ strname - The name of the peering service.
- resource_
group_ strname - The name of the resource group.
- peering_
service_ strprefix_ key - The peering service prefix key
- prefix str
- The prefix from which your traffic originates.
- prefix_
name str - The name of the prefix.
- peering
Service StringName - The name of the peering service.
- resource
Group StringName - The name of the resource group.
- peering
Service StringPrefix Key - The peering service prefix key
- prefix String
- The prefix from which your traffic originates.
- prefix
Name 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:
- Error
Message string - The error message for validation state
- Events
List<Pulumi.
Azure Native. Peering. Outputs. Peering Service Prefix Event Response> - The list of events for peering service prefix
- Id string
- The provider-assigned unique ID for this managed resource.
- Learned
Type string - The prefix learned type
- Name string
- The name of the resource.
- Prefix
Validation stringState - The prefix validation state
- Provisioning
State string - The provisioning state of the resource.
- Type string
- The type of the resource.
- Error
Message string - The error message for validation state
- Events
[]Peering
Service Prefix Event Response - The list of events for peering service prefix
- Id string
- The provider-assigned unique ID for this managed resource.
- Learned
Type string - The prefix learned type
- Name string
- The name of the resource.
- Prefix
Validation stringState - The prefix validation state
- Provisioning
State string - The provisioning state of the resource.
- Type string
- The type of the resource.
- error
Message String - The error message for validation state
- events
List<Peering
Service Prefix Event Response> - The list of events for peering service prefix
- id String
- The provider-assigned unique ID for this managed resource.
- learned
Type String - The prefix learned type
- name String
- The name of the resource.
- prefix
Validation StringState - The prefix validation state
- provisioning
State String - The provisioning state of the resource.
- type String
- The type of the resource.
- error
Message string - The error message for validation state
- events
Peering
Service Prefix Event Response[] - The list of events for peering service prefix
- id string
- The provider-assigned unique ID for this managed resource.
- learned
Type string - The prefix learned type
- name string
- The name of the resource.
- prefix
Validation stringState - The prefix validation state
- provisioning
State string - The provisioning state of the resource.
- type string
- The type of the resource.
- error_
message str - The error message for validation state
- events
Sequence[Peering
Service Prefix Event Response] - 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_ strstate - The prefix validation state
- provisioning_
state str - The provisioning state of the resource.
- type str
- The type of the resource.
- error
Message 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.
- learned
Type String - The prefix learned type
- name String
- The name of the resource.
- prefix
Validation StringState - The prefix validation state
- provisioning
State String - The provisioning state of the resource.
- type String
- The type of the resource.
Supporting Types
PeeringServicePrefixEventResponse, PeeringServicePrefixEventResponseArgs
- Event
Description string - The description of the event associated with a prefix.
- Event
Level string - The level of the event associated with a prefix.
- Event
Summary string - The summary of the event associated with a prefix.
- Event
Timestamp string - The timestamp of the event associated with a prefix.
- Event
Type string - The type of the event associated with a prefix.
- Event
Description string - The description of the event associated with a prefix.
- Event
Level string - The level of the event associated with a prefix.
- Event
Summary string - The summary of the event associated with a prefix.
- Event
Timestamp string - The timestamp of the event associated with a prefix.
- Event
Type string - The type of the event associated with a prefix.
- event
Description String - The description of the event associated with a prefix.
- event
Level String - The level of the event associated with a prefix.
- event
Summary String - The summary of the event associated with a prefix.
- event
Timestamp String - The timestamp of the event associated with a prefix.
- event
Type String - The type of the event associated with a prefix.
- event
Description string - The description of the event associated with a prefix.
- event
Level string - The level of the event associated with a prefix.
- event
Summary string - The summary of the event associated with a prefix.
- event
Timestamp string - The timestamp of the event associated with a prefix.
- event
Type string - The type of the event associated with a prefix.
- event_
description str - The description of the event associated with a prefix.
- event_
level str - The level of the event associated with a prefix.
- event_
summary str - The summary of the event associated with a prefix.
- event_
timestamp str - The timestamp of the event associated with a prefix.
- event_
type str - The type of the event associated with a prefix.
- event
Description String - The description of the event associated with a prefix.
- event
Level String - The level of the event associated with a prefix.
- event
Summary String - The summary of the event associated with a prefix.
- event
Timestamp String - The timestamp of the event associated with a prefix.
- event
Type 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}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0