1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. ByoIpPrefix
Cloudflare v6.0.1 published on Wednesday, Apr 16, 2025 by Pulumi

cloudflare.ByoIpPrefix

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";

const exampleByoIpPrefix = new cloudflare.ByoIpPrefix("example_byo_ip_prefix", {
    accountId: "258def64c72dae45f3e4c8516e2111f2",
    asn: 209242,
    cidr: "192.0.2.0/24",
    loaDocumentId: "d933b1530bc56c9953cf8ce166da8004",
});
Copy
import pulumi
import pulumi_cloudflare as cloudflare

example_byo_ip_prefix = cloudflare.ByoIpPrefix("example_byo_ip_prefix",
    account_id="258def64c72dae45f3e4c8516e2111f2",
    asn=209242,
    cidr="192.0.2.0/24",
    loa_document_id="d933b1530bc56c9953cf8ce166da8004")
Copy
package main

import (
	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudflare.NewByoIpPrefix(ctx, "example_byo_ip_prefix", &cloudflare.ByoIpPrefixArgs{
			AccountId:     pulumi.String("258def64c72dae45f3e4c8516e2111f2"),
			Asn:           pulumi.Int(209242),
			Cidr:          pulumi.String("192.0.2.0/24"),
			LoaDocumentId: pulumi.String("d933b1530bc56c9953cf8ce166da8004"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;

return await Deployment.RunAsync(() => 
{
    var exampleByoIpPrefix = new Cloudflare.ByoIpPrefix("example_byo_ip_prefix", new()
    {
        AccountId = "258def64c72dae45f3e4c8516e2111f2",
        Asn = 209242,
        Cidr = "192.0.2.0/24",
        LoaDocumentId = "d933b1530bc56c9953cf8ce166da8004",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.ByoIpPrefix;
import com.pulumi.cloudflare.ByoIpPrefixArgs;
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 exampleByoIpPrefix = new ByoIpPrefix("exampleByoIpPrefix", ByoIpPrefixArgs.builder()
            .accountId("258def64c72dae45f3e4c8516e2111f2")
            .asn(209242)
            .cidr("192.0.2.0/24")
            .loaDocumentId("d933b1530bc56c9953cf8ce166da8004")
            .build());

    }
}
Copy
resources:
  exampleByoIpPrefix:
    type: cloudflare:ByoIpPrefix
    name: example_byo_ip_prefix
    properties:
      accountId: 258def64c72dae45f3e4c8516e2111f2
      asn: 209242
      cidr: 192.0.2.0/24
      loaDocumentId: d933b1530bc56c9953cf8ce166da8004
Copy

Create ByoIpPrefix Resource

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

Constructor syntax

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

@overload
def ByoIpPrefix(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                account_id: Optional[str] = None,
                asn: Optional[int] = None,
                cidr: Optional[str] = None,
                loa_document_id: Optional[str] = None,
                description: Optional[str] = None)
func NewByoIpPrefix(ctx *Context, name string, args ByoIpPrefixArgs, opts ...ResourceOption) (*ByoIpPrefix, error)
public ByoIpPrefix(string name, ByoIpPrefixArgs args, CustomResourceOptions? opts = null)
public ByoIpPrefix(String name, ByoIpPrefixArgs args)
public ByoIpPrefix(String name, ByoIpPrefixArgs args, CustomResourceOptions options)
type: cloudflare:ByoIpPrefix
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. ByoIpPrefixArgs
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. ByoIpPrefixArgs
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. ByoIpPrefixArgs
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. ByoIpPrefixArgs
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. ByoIpPrefixArgs
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 byoIpPrefixResource = new Cloudflare.ByoIpPrefix("byoIpPrefixResource", new()
{
    AccountId = "string",
    Asn = 0,
    Cidr = "string",
    LoaDocumentId = "string",
    Description = "string",
});
Copy
example, err := cloudflare.NewByoIpPrefix(ctx, "byoIpPrefixResource", &cloudflare.ByoIpPrefixArgs{
	AccountId:     pulumi.String("string"),
	Asn:           pulumi.Int(0),
	Cidr:          pulumi.String("string"),
	LoaDocumentId: pulumi.String("string"),
	Description:   pulumi.String("string"),
})
Copy
var byoIpPrefixResource = new ByoIpPrefix("byoIpPrefixResource", ByoIpPrefixArgs.builder()
    .accountId("string")
    .asn(0)
    .cidr("string")
    .loaDocumentId("string")
    .description("string")
    .build());
Copy
byo_ip_prefix_resource = cloudflare.ByoIpPrefix("byoIpPrefixResource",
    account_id="string",
    asn=0,
    cidr="string",
    loa_document_id="string",
    description="string")
Copy
const byoIpPrefixResource = new cloudflare.ByoIpPrefix("byoIpPrefixResource", {
    accountId: "string",
    asn: 0,
    cidr: "string",
    loaDocumentId: "string",
    description: "string",
});
Copy
type: cloudflare:ByoIpPrefix
properties:
    accountId: string
    asn: 0
    cidr: string
    description: string
    loaDocumentId: string
Copy

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

AccountId This property is required. string
Identifier of a Cloudflare account.
Asn This property is required. int
Autonomous System Number (ASN) the prefix will be advertised under.
Cidr This property is required. string
IP Prefix in Classless Inter-Domain Routing format.
LoaDocumentId This property is required. string
Identifier for the uploaded LOA document.
Description string
Description of the prefix.
AccountId This property is required. string
Identifier of a Cloudflare account.
Asn This property is required. int
Autonomous System Number (ASN) the prefix will be advertised under.
Cidr This property is required. string
IP Prefix in Classless Inter-Domain Routing format.
LoaDocumentId This property is required. string
Identifier for the uploaded LOA document.
Description string
Description of the prefix.
accountId This property is required. String
Identifier of a Cloudflare account.
asn This property is required. Integer
Autonomous System Number (ASN) the prefix will be advertised under.
cidr This property is required. String
IP Prefix in Classless Inter-Domain Routing format.
loaDocumentId This property is required. String
Identifier for the uploaded LOA document.
description String
Description of the prefix.
accountId This property is required. string
Identifier of a Cloudflare account.
asn This property is required. number
Autonomous System Number (ASN) the prefix will be advertised under.
cidr This property is required. string
IP Prefix in Classless Inter-Domain Routing format.
loaDocumentId This property is required. string
Identifier for the uploaded LOA document.
description string
Description of the prefix.
account_id This property is required. str
Identifier of a Cloudflare account.
asn This property is required. int
Autonomous System Number (ASN) the prefix will be advertised under.
cidr This property is required. str
IP Prefix in Classless Inter-Domain Routing format.
loa_document_id This property is required. str
Identifier for the uploaded LOA document.
description str
Description of the prefix.
accountId This property is required. String
Identifier of a Cloudflare account.
asn This property is required. Number
Autonomous System Number (ASN) the prefix will be advertised under.
cidr This property is required. String
IP Prefix in Classless Inter-Domain Routing format.
loaDocumentId This property is required. String
Identifier for the uploaded LOA document.
description String
Description of the prefix.

Outputs

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

Advertised bool
Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
AdvertisedModifiedAt string
Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
Approved string
Approval state of the prefix (P = pending, V = active).
CreatedAt string
Id string
The provider-assigned unique ID for this managed resource.
ModifiedAt string
OnDemandEnabled bool
Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
OnDemandLocked bool
Whether advertisement status of the prefix is locked, meaning it cannot be changed.
Advertised bool
Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
AdvertisedModifiedAt string
Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
Approved string
Approval state of the prefix (P = pending, V = active).
CreatedAt string
Id string
The provider-assigned unique ID for this managed resource.
ModifiedAt string
OnDemandEnabled bool
Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
OnDemandLocked bool
Whether advertisement status of the prefix is locked, meaning it cannot be changed.
advertised Boolean
Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
advertisedModifiedAt String
Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
approved String
Approval state of the prefix (P = pending, V = active).
createdAt String
id String
The provider-assigned unique ID for this managed resource.
modifiedAt String
onDemandEnabled Boolean
Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
onDemandLocked Boolean
Whether advertisement status of the prefix is locked, meaning it cannot be changed.
advertised boolean
Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
advertisedModifiedAt string
Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
approved string
Approval state of the prefix (P = pending, V = active).
createdAt string
id string
The provider-assigned unique ID for this managed resource.
modifiedAt string
onDemandEnabled boolean
Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
onDemandLocked boolean
Whether advertisement status of the prefix is locked, meaning it cannot be changed.
advertised bool
Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
advertised_modified_at str
Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
approved str
Approval state of the prefix (P = pending, V = active).
created_at str
id str
The provider-assigned unique ID for this managed resource.
modified_at str
on_demand_enabled bool
Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
on_demand_locked bool
Whether advertisement status of the prefix is locked, meaning it cannot be changed.
advertised Boolean
Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
advertisedModifiedAt String
Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
approved String
Approval state of the prefix (P = pending, V = active).
createdAt String
id String
The provider-assigned unique ID for this managed resource.
modifiedAt String
onDemandEnabled Boolean
Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
onDemandLocked Boolean
Whether advertisement status of the prefix is locked, meaning it cannot be changed.

Look up Existing ByoIpPrefix Resource

Get an existing ByoIpPrefix resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: ByoIpPrefixState, opts?: CustomResourceOptions): ByoIpPrefix
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_id: Optional[str] = None,
        advertised: Optional[bool] = None,
        advertised_modified_at: Optional[str] = None,
        approved: Optional[str] = None,
        asn: Optional[int] = None,
        cidr: Optional[str] = None,
        created_at: Optional[str] = None,
        description: Optional[str] = None,
        loa_document_id: Optional[str] = None,
        modified_at: Optional[str] = None,
        on_demand_enabled: Optional[bool] = None,
        on_demand_locked: Optional[bool] = None) -> ByoIpPrefix
func GetByoIpPrefix(ctx *Context, name string, id IDInput, state *ByoIpPrefixState, opts ...ResourceOption) (*ByoIpPrefix, error)
public static ByoIpPrefix Get(string name, Input<string> id, ByoIpPrefixState? state, CustomResourceOptions? opts = null)
public static ByoIpPrefix get(String name, Output<String> id, ByoIpPrefixState state, CustomResourceOptions options)
resources:  _:    type: cloudflare:ByoIpPrefix    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccountId string
Identifier of a Cloudflare account.
Advertised bool
Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
AdvertisedModifiedAt string
Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
Approved string
Approval state of the prefix (P = pending, V = active).
Asn int
Autonomous System Number (ASN) the prefix will be advertised under.
Cidr string
IP Prefix in Classless Inter-Domain Routing format.
CreatedAt string
Description string
Description of the prefix.
LoaDocumentId string
Identifier for the uploaded LOA document.
ModifiedAt string
OnDemandEnabled bool
Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
OnDemandLocked bool
Whether advertisement status of the prefix is locked, meaning it cannot be changed.
AccountId string
Identifier of a Cloudflare account.
Advertised bool
Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
AdvertisedModifiedAt string
Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
Approved string
Approval state of the prefix (P = pending, V = active).
Asn int
Autonomous System Number (ASN) the prefix will be advertised under.
Cidr string
IP Prefix in Classless Inter-Domain Routing format.
CreatedAt string
Description string
Description of the prefix.
LoaDocumentId string
Identifier for the uploaded LOA document.
ModifiedAt string
OnDemandEnabled bool
Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
OnDemandLocked bool
Whether advertisement status of the prefix is locked, meaning it cannot be changed.
accountId String
Identifier of a Cloudflare account.
advertised Boolean
Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
advertisedModifiedAt String
Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
approved String
Approval state of the prefix (P = pending, V = active).
asn Integer
Autonomous System Number (ASN) the prefix will be advertised under.
cidr String
IP Prefix in Classless Inter-Domain Routing format.
createdAt String
description String
Description of the prefix.
loaDocumentId String
Identifier for the uploaded LOA document.
modifiedAt String
onDemandEnabled Boolean
Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
onDemandLocked Boolean
Whether advertisement status of the prefix is locked, meaning it cannot be changed.
accountId string
Identifier of a Cloudflare account.
advertised boolean
Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
advertisedModifiedAt string
Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
approved string
Approval state of the prefix (P = pending, V = active).
asn number
Autonomous System Number (ASN) the prefix will be advertised under.
cidr string
IP Prefix in Classless Inter-Domain Routing format.
createdAt string
description string
Description of the prefix.
loaDocumentId string
Identifier for the uploaded LOA document.
modifiedAt string
onDemandEnabled boolean
Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
onDemandLocked boolean
Whether advertisement status of the prefix is locked, meaning it cannot be changed.
account_id str
Identifier of a Cloudflare account.
advertised bool
Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
advertised_modified_at str
Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
approved str
Approval state of the prefix (P = pending, V = active).
asn int
Autonomous System Number (ASN) the prefix will be advertised under.
cidr str
IP Prefix in Classless Inter-Domain Routing format.
created_at str
description str
Description of the prefix.
loa_document_id str
Identifier for the uploaded LOA document.
modified_at str
on_demand_enabled bool
Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
on_demand_locked bool
Whether advertisement status of the prefix is locked, meaning it cannot be changed.
accountId String
Identifier of a Cloudflare account.
advertised Boolean
Prefix advertisement status to the Internet. This field is only not 'null' if on demand is enabled.
advertisedModifiedAt String
Last time the advertisement status was changed. This field is only not 'null' if on demand is enabled.
approved String
Approval state of the prefix (P = pending, V = active).
asn Number
Autonomous System Number (ASN) the prefix will be advertised under.
cidr String
IP Prefix in Classless Inter-Domain Routing format.
createdAt String
description String
Description of the prefix.
loaDocumentId String
Identifier for the uploaded LOA document.
modifiedAt String
onDemandEnabled Boolean
Whether advertisement of the prefix to the Internet may be dynamically enabled or disabled.
onDemandLocked Boolean
Whether advertisement status of the prefix is locked, meaning it cannot be changed.

Import

$ pulumi import cloudflare:index/byoIpPrefix:ByoIpPrefix example '<account_id>/<prefix_id>'
Copy

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

Package Details

Repository
Cloudflare pulumi/pulumi-cloudflare
License
Apache-2.0
Notes
This Pulumi package is based on the cloudflare Terraform Provider.